public interface StateNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to State
objects in this Process.
This also
includes existing states that may appear or disappear due to changes in
the Process
hierarchy, 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 is closed.
The two views defined in this session correspond to the views in the
StateLookupSession.
Modifier and Type | Method and Description |
---|---|
void |
acknowledgeStateNotification(Id notificationId)
Acknowledge a state notification.
|
boolean |
canRegisterForStateNotifications()
Tests if this user can register for
State
notifications. |
Process |
getProcess()
Gets the
Process associated with this session. |
Id |
getProcessId()
Gets the
Process Id associated with this
session. |
void |
registerForChangedState(Id stateId)
Registers for notification of an updated state.
|
void |
registerForChangedStates()
Registers for notification of updated states.
|
void |
registerForDeletedState(Id stateId)
Registers for notification of a deleted state.
|
void |
registerForDeletedStates()
Registers for notification of deleted states.
|
void |
registerForNewStates()
Register for notifications of new states.
|
void |
reliableStateNotifications()
Reliable notifications are desired.
|
void |
unreliableStateNotifications()
Unreliable notifications are desired.
|
void |
useFederatedProcessView()
Federates the view for methods in this session.
|
void |
useIsolatedProcessView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getProcessId()
Process
Id
associated with this
session. Process Id
associated with this sessionmandatory
- This method must be implemented. Process getProcess() throws OperationFailedException, PermissionDeniedException
Process
associated with this session. Process
associated with this sessionOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForStateNotifications()
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 useFederatedProcessView()
mandatory
- This method is must be implemented. void useIsolatedProcessView()
mandatory
- This method is must be implemented. void reliableStateNotifications()
acknowledgeStateNotification()
.mandatory
- This method is must be implemented. void unreliableStateNotifications()
mandatory
- This method is must be implemented. void acknowledgeStateNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
notificationId
- the Id
of the notificationOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewStates() throws OperationFailedException, PermissionDeniedException
StateReceiver.newStates()
is invoked when a new State
is appears in this process.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedStates() throws OperationFailedException, PermissionDeniedException
StateReceiver.changedStates()
is invoked when a state in this
process is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedState(Id stateId) throws OperationFailedException, PermissionDeniedException
StateReceiver.changedStates()
is invoked when the specified
state in this process is changed.stateId
- the Id
of the State
to
monitorNullArgumentException
- stateId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedStates() throws OperationFailedException, PermissionDeniedException
StateReceiver.deletedStates()
is invoked when a state is
deleted or removed from this process.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedState(Id stateId) throws OperationFailedException, PermissionDeniedException
StateReceiver.deletedStates()
is invoked when the specified
state is deleted or removed from this process.stateId
- the Id
of the State
to
monitorNullArgumentException
- stateId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.