Interface ResourceRelationshipNotificationSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods to receive asynchronous notifications on adds/changes to resource relationships. 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 views defined in this session correspond to the views in the
ResourceRelationshipLookupSession .
-
Method Summary
Modifier and TypeMethodDescriptionvoidacknowledgeResourceRelationshipNotification(Id notificationId) Acknowledge a resource relationship notification.booleanTests if this user can register forResourceRelationshipnotifications.getBin()Gets theBinassociated with this session.getBinId()Gets theBinIdassociated with this session.voidregisterForChangedResourceRelationship(Id resourceRelationshipId) Registers for notification of an updated relationship.voidRegisters for notification of updated relationships.voidregisterForChangedResourceRelationshipsByGenusType(Type resourceRelationshipGenusType) Register for notifications of changed relationshipsof the given genus type.voidRegister for notifications of changed relationships to the given resource.voidRegister for notifications of changed relationships from the given resource.voidregisterForDeletedResourceRelationship(Id resourceRelationshipId) Registers for notification of a deleted relationship.voidRegisters for notification of deleted relationships.voidregisterForDeletedResourceRelationshipsByGenusType(Type resourceRelationshipGenusType) Register for notifications of deleted relationships of the given genus type.voidRegister for notifications of deleted relationships to the given resource.voidRegister for notifications of deleted relationships from the given resource.voidRegister for notifications of new relationship.voidregisterForNewResourceRelationshipsByGenusType(Type resourceRelationshipGenusType) Register for notifications of new relationships of the given genus type.voidRegister for notifications of new relationships to the given resource.voidRegister for notifications of new relationships from the given resource.voidReliable notifications are desired.voidUnreliable notifications are desired.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.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
-
getBinId
Id getBinId()Gets theBinIdassociated with this session.- Returns:
- the
Bin Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getBin
Gets theBinassociated with this session.- Returns:
- the bin
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canRegisterForResourceRelationshipNotifications
boolean canRegisterForResourceRelationshipNotifications()Tests if this user can register forResourceRelationshipnotifications. 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.
-
useFederatedBinView
void useFederatedBinView()Federates the view for methods in this session. A federated view will include notifications for relationships in bins which are children of this bin in the bin hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedBinView
void useIsolatedBinView()Isolates the view for methods in this session. An isolated view restricts notifications for relationships in this bin only.- Compliance:
mandatory- This method is must be implemented.
-
reliableResourceRelationshipNotifications
void reliableResourceRelationshipNotifications()Reliable notifications are desired. In reliable mode, notifications are to be acknowledged usingacknowledgeResourceRelationshipNotification().- Compliance:
mandatory- This method is must be implemented.
-
unreliableResourceRelationshipNotifications
void unreliableResourceRelationshipNotifications()Unreliable notifications are desired. In unreliable mode, notifications do not need to be acknowledged.- Compliance:
mandatory- This method is must be implemented.
-
acknowledgeResourceRelationshipNotification
void acknowledgeResourceRelationshipNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException Acknowledge a resource relationship notification.- Parameters:
notificationId- theIdof the notification- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewResourceRelationships
void registerForNewResourceRelationships() throws OperationFailedException, PermissionDeniedExceptionRegister for notifications of new relationship.ResourceRelationshipReceiver.newResourceRelationships()is invoked when a new relationship is created.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewResourceRelationshipsByGenusType
void registerForNewResourceRelationshipsByGenusType(Type resourceRelationshipGenusType) throws OperationFailedException, PermissionDeniedException Register for notifications of new relationships of the given genus type.ResourceRelationshipReceiver.newResourceRelationships()is invoked when a new relationship is created.- Parameters:
resourceRelationshipGenusType- the rsource relationship genus type- Throws:
NullArgumentException-resourceRelationshipGenusType is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewResourceRelationshipsForSourceResource
void registerForNewResourceRelationshipsForSourceResource(Id resourceId) throws OperationFailedException, PermissionDeniedException Register for notifications of new relationships from the given resource.ResourceRelationshipReceiver.newResourceRelationships()is invoked when a new relationship is created.- Parameters:
resourceId- theIdof theResourceto monitor- Throws:
NullArgumentException-resourceId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewResourceRelationshipsForDestinationResource
void registerForNewResourceRelationshipsForDestinationResource(Id resourceId) throws OperationFailedException, PermissionDeniedException Register for notifications of new relationships to the given resource.ResourceRelationshipReceiver.newResourceRelationships()is invoked when a new relationship is created.- Parameters:
resourceId- theIdof theResourceto monitor- Throws:
NullArgumentException-resourceId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedResourceRelationships
void registerForChangedResourceRelationships() throws OperationFailedException, PermissionDeniedExceptionRegisters for notification of updated relationships.ResourceRelationshipReceiver.changedResourceRelationships()is invoked when a relationship is changed.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedResourceRelationshipsByGenusType
void registerForChangedResourceRelationshipsByGenusType(Type resourceRelationshipGenusType) throws OperationFailedException, PermissionDeniedException Register for notifications of changed relationshipsof the given genus type.ResourceRelationshipReceiver.changedResourceRelationships()is invoked when a relationship is changed.- Parameters:
resourceRelationshipGenusType- the rsource relationship genus type- Throws:
NullArgumentException-resourceRelationshipGenusType is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedResourceRelationshipsForSourceResource
void registerForChangedResourceRelationshipsForSourceResource(Id resourceId) throws OperationFailedException, PermissionDeniedException Register for notifications of changed relationships from the given resource.ResourceRelationshipReceiver.changedResourceRelationships()is invoked when a relationship is changed.- Parameters:
resourceId- theIdof theResourceto monitor- Throws:
NullArgumentException-resourceId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedResourceRelationshipsForDestinationResource
void registerForChangedResourceRelationshipsForDestinationResource(Id resourceId) throws OperationFailedException, PermissionDeniedException Register for notifications of changed relationships to the given resource.ResourceRelationshipReceiver.changedResourceRelationships()is invoked when a relationship is changed.- Parameters:
resourceId- theIdof theResourceto monitor- Throws:
NullArgumentException-resourceId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedResourceRelationship
void registerForChangedResourceRelationship(Id resourceRelationshipId) throws OperationFailedException, PermissionDeniedException Registers for notification of an updated relationship.ResourceRelationshipReceiver.changedResourceRelationships()is invoked when the specified relationship is changed.- Parameters:
resourceRelationshipId- theIdof theResourceRelationshipto monitor- Throws:
NullArgumentException-resourceRelationshipId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedResourceRelationships
void registerForDeletedResourceRelationships() throws OperationFailedException, PermissionDeniedExceptionRegisters for notification of deleted relationships.ResourceRelationshipReceiver.deletedResourceRelationships()is invoked when a relationship is deleted.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedResourceRelationshipsByGenusType
void registerForDeletedResourceRelationshipsByGenusType(Type resourceRelationshipGenusType) throws OperationFailedException, PermissionDeniedException Register for notifications of deleted relationships of the given genus type.ResourceRelationshipReceiver.deletedResourceRelationships()is invoked when a relationship is deleted.- Parameters:
resourceRelationshipGenusType- the rsource relationship genus type- Throws:
NullArgumentException-resourceRelationshipGenusType is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedResourceRelationshipsForSourceResource
void registerForDeletedResourceRelationshipsForSourceResource(Id resourceId) throws OperationFailedException, PermissionDeniedException Register for notifications of deleted relationships from the given resource.ResourceRelationshipReceiver.deletedResourceRelationships()is invoked when a relationship is deleted.- Parameters:
resourceId- theIdof theResourceto monitor- Throws:
NullArgumentException-resourceRelationshipId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedResourceRelationshipsForDestinationResource
void registerForDeletedResourceRelationshipsForDestinationResource(Id resourceId) throws OperationFailedException, PermissionDeniedException Register for notifications of deleted relationships to the given resource.ResourceRelationshipReceiver.deletedResourceRelationships()is invoked when a relationship is deleted.- Parameters:
resourceId- theIdof theResourceto monitor- Throws:
NullArgumentException-resourceRelationshipId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedResourceRelationship
void registerForDeletedResourceRelationship(Id resourceRelationshipId) throws OperationFailedException, PermissionDeniedException Registers for notification of a deleted relationship.ResourceRelationshipReceiver.changedResourceRelationships()is invoked when the specified relationship is deleted.- Parameters:
resourceRelationshipId- theIdof theResourceRelationshipto monitor- Throws:
NullArgumentException-resourceRelationshipId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-