public interface StateChangeNotificationSession extends OsidSession
This session defines methods to receive notifications on changes of object states. This session is intended for consumers needing to synchronize their state with this service without the use of polling. Notifications are cancelled when this session
Modifier and Type | Method and Description |
---|---|
void |
acknowledgeStateChangeNotification(Id notificationId)
Acknowledge a state change notification.
|
boolean |
canRegisterForStateChangeNotifications()
Tests if this user can register for
State
notifications. |
void |
registerForChangedState()
Registers for notification of updated states.
|
void |
registerForChangedState(Id id)
Registers for notification of an updated state.
|
void |
reliableStateChangeNotifications()
Reliable notifications are desired.
|
void |
unreliableStateChangeNotifications()
Unreliable notifications are desired.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canRegisterForStateChangeNotifications()
State
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 reliableStateChangeNotifications()
acknowledgeStateChangeNotification()
.mandatory
- This method is must be implemented. void unreliableStateChangeNotifications()
mandatory
- This method is must be implemented. void acknowledgeStateChangeNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
notificationId
- the Id
of the notificationOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedState() throws OperationFailedException, PermissionDeniedException
StateChangeReceiver.changedState()
is invoked when a state is
changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedState(Id id) throws OperationFailedException, PermissionDeniedException
StateChangeReceiver.changedState()
is invoked when the
specified state is changed.id
- the Id
to monitorNullArgumentException
- id
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.