Interface EndpointNotificationSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods to receive notifications on adds/changes
to Endpoint 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.
-
Method Summary
Modifier and TypeMethodDescriptionvoidacknowledgeEndpointNotification(Id notificationId) Acknowledge a endpoint notification.booleanTests if this user can register forEndpointnotifications.voidregisterForChangedEndpoint(Id endpointId) Registers for notification of an updated endpoint.voidRegisters for notification of an updated endpoint hierarchy structure.voidregisterForChangedEndpointHierarchyForAncestors(Id endpointId) Registers for notification of an updated endpoint hierarchy structure.voidregisterForChangedEndpointHierarchyForDescendants(Id endpointId) Registers for notification of an updated endpoint hierarchy structure.voidRegisters for notification of updated endpoints.voidregisterForDeletedEndpoint(Id endpointId) Registers for notification of a deleted endpoint.voidRegisters for notification of deleted endpoints.voidRegister for notifications of new endpoints.voidReliable notifications are desired.voidUnreliable notifications are desired.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
canRegisterForEndpointNotifications
boolean canRegisterForEndpointNotifications()Tests if this user can register forEndpointnotifications. 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer notification operations.- Returns:
falseif notification methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
reliableEndpointNotifications
void reliableEndpointNotifications()Reliable notifications are desired. In reliable mode, notifications are to be acknowledged usingacknowledgeEndpointNotification().- Compliance:
mandatory- This method is must be implemented.
-
unreliableEndpointNotifications
void unreliableEndpointNotifications()Unreliable notifications are desired. In unreliable mode, notifications do not need to be acknowledged.- Compliance:
mandatory- This method is must be implemented.
-
acknowledgeEndpointNotification
void acknowledgeEndpointNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException Acknowledge a endpoint notification.- Parameters:
notificationId- theIdof the notification- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewEndpoints
Register for notifications of new endpoints.EndpointReceiver.newEndpoints()is invoked when a newEndpointis created.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedEndpoints
Registers for notification of updated endpoints.EndpointReceiver.changedEndpoints()is invoked when a endpoint is changed.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedEndpoint
void registerForChangedEndpoint(Id endpointId) throws OperationFailedException, PermissionDeniedException Registers for notification of an updated endpoint.EndpointReceiver.changedEndpoints()is invoked when the specified endpoint is changed.- Parameters:
endpointId- the Id of the Endpoint to monitor- Throws:
NullArgumentException-endpointIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedEndpoints
Registers for notification of deleted endpoints.EndpointReceiver.deletedEndpoints()is invoked when a endpoint is deleted.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedEndpoint
void registerForDeletedEndpoint(Id endpointId) throws OperationFailedException, PermissionDeniedException Registers for notification of a deleted endpoint.EndpointReceiver.deletedEndpoints()is invoked when the specified endpoint is deleted.- Parameters:
endpointId- theIdof theEndpointto monitor- Throws:
NullArgumentException-endpointIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedEndpointHierarchy
void registerForChangedEndpointHierarchy() throws OperationFailedException, PermissionDeniedExceptionRegisters for notification of an updated endpoint hierarchy structure.EndpointReceiver.changedChildOfEndpoints()is invoked when the specified node or any of its descendants experiences a change in its children.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedEndpointHierarchyForAncestors
void registerForChangedEndpointHierarchyForAncestors(Id endpointId) throws OperationFailedException, PermissionDeniedException Registers for notification of an updated endpoint hierarchy structure.EndpointReceiver.changedChildOfEndpoints()is invoked when the specified node or any of its descendants experiences a change in its children.- Parameters:
endpointId- theIdof theEndpointnode to monitor- Throws:
NullArgumentException-endpointIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedEndpointHierarchyForDescendants
void registerForChangedEndpointHierarchyForDescendants(Id endpointId) throws OperationFailedException, PermissionDeniedException Registers for notification of an updated endpoint hierarchy structure.EndpointReceiver.changedChildOfEndpoints()is invoked when the specified node or any of its descendants experiences a change in its children.- Parameters:
endpointId- theIdof theEndpointnode to monitor- Throws:
NullArgumentException-endpointIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-