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 |
|---|---|
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 |
registerForDeletedAgencies()
Registers for notification of deleted agencies.
|
void |
registerForDeletedAgency(Id agencyId)
Registers for notification of a deleted agency.
|
void |
registerForDeletedAgencyAncestors(Id agencyId)
Registers for notification if an ancestor is removed from the
specified agency in the agency hierarchy.
|
void |
registerForDeletedAgencyDescendants(Id agencyId)
Registers for notification if a descendant is removed from fthe
specified agency in the agency hierarchy.
|
void |
registerForNewAgencies()
Register for notifications of new agencies.
|
void |
registerForNewAgencyAncestors(Id agencyId)
Registers for notification if an ancestor is added to the specified
agency in the agency hierarchy.
|
void |
registerForNewAgencyDescendants(Id agencyId)
Registers for notification if a descendant is added to the specified
agency in the agency hierarchy.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseboolean 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 registerForNewAgencies()
throws OperationFailedException,
PermissionDeniedException
AgencyReceiver.newAgency() is invoked when a new Agency
is created.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForNewAgencyAncestors(Id agencyId) throws OperationFailedException, PermissionDeniedException
AgencyReceiver.newAgencyAncestor() is invoked when the
specified agency experiences an addition in ancestry.agencyId - the Id of the agency to monitorNullArgumentException - agencyId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForNewAgencyDescendants(Id agencyId) throws OperationFailedException, PermissionDeniedException
AgencyReceiver.newAgencyDescendant() is invoked when the
specified agency experiences an addition in descendants.agencyId - the Id of the agency to monitorNullArgumentException - agencyId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForChangedAgencies()
throws OperationFailedException,
PermissionDeniedException
AgencyReceiver.changedAgency() 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.changedAgency() 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.deletedAgency() 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.deletedAgency() 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 registerForDeletedAgencyAncestors(Id agencyId) throws OperationFailedException, PermissionDeniedException
AgencyReceiver.deletedAgencyAncestor() is invoked when the
specified agency experiences a removal of an ancestor.agencyId - the Id of the agency to monitorNullArgumentException - agencyId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForDeletedAgencyDescendants(Id agencyId) throws OperationFailedException, PermissionDeniedException
AgencyReceiver.deletedAgencyDescednant() is invoked when the
specified agency experiences a removal of one of its descendants.agencyId - the Id of the agency to monitorNullArgumentException - agencyId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.