public interface AgencyNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Agency
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.
Modifier and Type | Method and Description |
---|---|
void |
acknowledgeAgencyNotification(Id notificationId)
Acknowledge an agency notification.
|
boolean |
canRegisterForAgencyNotifications()
Tests if this user can register for
Agency
notifications. |
void |
registerForChangedAgencies()
Registers for notification of updated agencies.
|
void |
registerForChangedAgency(Id agencyId)
Registers for notification of an updated agency.
|
void |
registerForChangedAgencyHierarchy()
Registers for notification of an updated agency hierarchy structure.
|
void |
registerForChangedAgencyHierarchyForAncestors(Id agencyId)
Registers for notification of an updated agency hierarchy structure.
|
void |
registerForChangedAgencyHierarchyForDescendants(Id agencyId)
Registers for notification of an updated agency hierarchy structure.
|
void |
registerForDeletedAgencies()
Registers for notification of deleted agencies.
|
void |
registerForDeletedAgency(Id agencyId)
Registers for notification of a deleted agency.
|
void |
registerForNewAgencies()
Register for notifications of new agencies.
|
void |
reliableAgencyNotifications()
Reliable notifications are desired.
|
void |
unreliableAgencyNotifications()
Unreliable notifications are desired.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canRegisterForAgencyNotifications()
Agency
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 reliableAgencyNotifications()
acknowledgeAgencyNotification()
.mandatory
- This method is must be implemented. void unreliableAgencyNotifications()
mandatory
- This method is must be implemented. void acknowledgeAgencyNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
notificationId
- the Id
of the notificationOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewAgencies() throws OperationFailedException, PermissionDeniedException
AgencyReceiver.newAgencies()
is invoked when a new
Agency
is created.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedAgencies() throws OperationFailedException, PermissionDeniedException
AgencyReceiver.changedAgencies()
is invoked when an agency is
changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedAgency(Id agencyId) throws OperationFailedException, PermissionDeniedException
AgencyReceiver.changedAgencies()
is invoked when the specified
agency is changed.agencyId
- the Id
of the agency to monitorNullArgumentException
- agencyId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedAgencies() throws OperationFailedException, PermissionDeniedException
AgencyReceiver.deletedAgencies()
is invoked when an agency is
deleted.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedAgency(Id agencyId) throws OperationFailedException, PermissionDeniedException
AgencyReceiver.deletedAgencies()
is invoked when the specified
agency is deleted.agencyId
- the Id
of the agency to monitorNullArgumentException
- agencyId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedAgencyHierarchy() throws OperationFailedException, PermissionDeniedException
AgencyReceiver.changedChildOfAgencies()
is invoked when
a node experiences a change in its children.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedAgencyHierarchyForAncestors(Id agencyId) throws OperationFailedException, PermissionDeniedException
AgencyReceiver.changedChildOfAgencies()
is invoked when
the specified node or any of its ancestors experiences a change in its
children.agencyId
- the Id
of the Agency
node to monitorNullArgumentException
- agencyId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedAgencyHierarchyForDescendants(Id agencyId) throws OperationFailedException, PermissionDeniedException
AgencyReceiver.changedChildOfAgencies()
is invoked when
the specified node or any of its descendants experiences a change in
its children.agencyId
- the Id
of the Agency
node to monitorNullArgumentException
- agencyId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.