public interface DispatchNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Dispatch
objects. 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.
Notifications are triggered with changes to the Dispatch
object itself. Adding and removing subscriptions result in
notifications available from the notification session for subscriptions.
Modifier and Type | Method and Description |
---|---|
void |
acknowledgeDispatchNotification(Id notificationId)
Acknowledge a dispatch notification.
|
boolean |
canRegisterForDispatchNotifications()
Tests if this user can register for
Dispatch
notifications. |
Publisher |
getPublisher()
Gets the
Publisher associated with this session. |
Id |
getPublisherId()
Gets the
Publisher Id associated with
this session. |
void |
registerForChangedDispatch(Id dispatchId)
Registers for notification of an updated dispatch.
|
void |
registerForChangedDispatches()
Registers for notification of updated dispatches.
|
void |
registerForDeletedDispatch(Id dispatchId)
Registers for notification of a deleted dispatch.
|
void |
registerForDeletedDispatches()
Registers for notification of deleted dispatches.
|
void |
registerForNewDispatches()
Register for notifications of new dispatches.
|
void |
reliableDispatchNotifications()
Reliable notifications are desired.
|
void |
unreliableDispatchNotifications()
Unreliable notifications are desired.
|
void |
useFederatedPublisherView()
Federates the view for methods in this session.
|
void |
useIsolatedPublisherView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getPublisherId()
Publisher
Id
associated with
this session. Publisher Id
associated with this sessionmandatory
- This method must be implemented. Publisher getPublisher() throws OperationFailedException, PermissionDeniedException
Publisher
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForDispatchNotifications()
Dispatch
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 useFederatedPublisherView()
mandatory
- This method is must be implemented. void useIsolatedPublisherView()
mandatory
- This method is must be implemented. void reliableDispatchNotifications()
acknowledgeDispatchNotification()
.mandatory
- This method is must be implemented. void unreliableDispatchNotifications()
mandatory
- This method is must be implemented. void acknowledgeDispatchNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
notificationId
- the Id
of the notificationOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewDispatches() throws OperationFailedException, PermissionDeniedException
DispatchReceiver.newDispatches()
is invoked when a new
Dispatch
is created.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedDispatches() throws OperationFailedException, PermissionDeniedException
DispatchReceiver.changedDispatches()
is invoked when a
dispatch is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedDispatch(Id dispatchId) throws OperationFailedException, PermissionDeniedException
DispatchReceiver.changedDispatches()
is invoked when the
specified dispatch is changed.dispatchId
- the Id
of the Dispatch
to monitorNullArgumentException
- dispatchId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedDispatches() throws OperationFailedException, PermissionDeniedException
DispatchReceiver.deletedDispatches()
is invoked when a
dispatch is deleted.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedDispatch(Id dispatchId) throws OperationFailedException, PermissionDeniedException
DispatchReceiver.deletedDispatches()
is invoked when the
specified dispatch is deleted.dispatchId
- the Id
of the Dispatch
to monitorNullArgumentException
- dispatchId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.