public interface ValueNotificationSession extends OsidSession
This session defines methods to receive notifications on changes to
Values.
A particular value in a set may have been added or
deleted, but all changes appear as a change to a parameter. Once a change
notification is received, the new value list can be obtained through the
ValueLookupSession.
This session is intended for adapters
and providers needing to synchronize their state with this service without
the use of polling. Notifications are cancelled when this session is
closed.
Two views are defined;
The methods federateValuerView()
and
isolateValueView()
behave as a radio group and one should be
selected before invoking any lookup methods.
Modifier and Type | Method and Description |
---|---|
void |
acknowledgeValueNotification(Id notificationId)
Acknowledge a value notification.
|
boolean |
canRegisterForValueNotifications()
Tests if this user can register for
Value
notifications. |
Configuration |
getConfiguration()
Gets the
Configuration associated with this session. |
Id |
getConfigurationId()
Gets the
Configuration Id associated
with this session. |
void |
registerForChangedValue(Id valueId)
Assigns a callback for notifications of an update to a value in this
configuration.
|
void |
registerForChangedValues()
Assigns a callback for notification of updated parameter values in
this configuration.
|
void |
registerForChangedValuesForParameter(Id parameterId)
Assigns a callback for notifications of changed values for the given
parameter.
|
void |
registerForDeletedValue(Id valueId)
Assigns a callback for notifications of an update to a value in this
configuration.
|
void |
registerForDeletedValues()
Assigns a callback for notification of deleted values in this
configuration.
|
void |
registerForDeletedValuesForParameter(Id parameterId)
Assigns a callback for notifications of changed values for the given
parameter.
|
void |
registerForNewValues()
Assigns a callback for notifications of new values.
|
void |
registerForNewValuesForParameter(Id parameterId)
Assigns a callback for notifications of new values for the given
parameter.
|
void |
reliableValueNotifications()
Reliable notifications are desired.
|
void |
unreliableValueNotifications()
Unreliable notifications are desired.
|
void |
useFederatedConfigurationView()
Federates the view for methods in this session.
|
void |
useIsolatedConfigurationView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getConfigurationId()
Configuration
Id
associated
with this session. Configuration
Id
associated
with this sessionmandatory
- This method must be implemented. Configuration getConfiguration() throws OperationFailedException, PermissionDeniedException
Configuration
associated with this session. Configuration
associated with this sessionOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForValueNotifications()
Value
notifications. A return of true does not guarantee successful
authorization. A return of false indicates that it is known all
methods in this session will result in a PERMISSION_DENIED.
This is intended as a hint to an application that may opt not
to offer notification operations. false
if notification methods are not
authorized, true
otherwisemandatory
- This method must be implemented. void useFederatedConfigurationView()
mandatory
- This method is must be implemented. void useIsolatedConfigurationView()
mandatory
- This method is must be implemented. void reliableValueNotifications()
acknowledgeValueNotification()
.mandatory
- This method is must be implemented. void unreliableValueNotifications()
mandatory
- This method is must be implemented. void acknowledgeValueNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
notificationId
- the Id
of the notificationOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewValues() throws OperationFailedException, PermissionDeniedException
ValueReceiver.newValues()
is invoked when a new Value
is added to this configuration.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewValuesForParameter(Id parameterId) throws OperationFailedException, PermissionDeniedException
ValueReceiver.newValues()
is invoked when a
new Value
is added to this configuration.parameterId
- the Id
of the Parameter
to monitorNullArgumentException
- parameterId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedValues() throws OperationFailedException, PermissionDeniedException
ValueReceiver.changedValues()
is
invoked when a Value
is changed in this configuration.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedValuesForParameter(Id parameterId) throws OperationFailedException, PermissionDeniedException
ValueReceiver.changedValues()
is invoked
when a Value
is updated to this configuration.parameterId
- the Id
of the Parameter
to monitorNullArgumentException
- parameterId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedValue(Id valueId) throws OperationFailedException, PermissionDeniedException
ValueReceiver.changedValues()
is invoked
when the specified Value
is updated in this
configuration.valueId
- the Id
of the Value
to
monitorNullArgumentException
- valueId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedValues() throws OperationFailedException, PermissionDeniedException
ValueReceiver.changedValues()
is invoked
when a Value
is removed from this configuration.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedValuesForParameter(Id parameterId) throws OperationFailedException, PermissionDeniedException
ValueReceiver.changedValues()
is invoked
when a Value
is removed from this configuration.parameterId
- the Id
of the Parameter
to monitorNullArgumentException
- parameterId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedValue(Id valueId) throws OperationFailedException, PermissionDeniedException
ValueReceiver.changedValues()
is invoked
when the specified Value
is removed from this
configuration.valueId
- the Id
of the Value
to
monitorNullArgumentException
- valueId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.