public interface ResourceRelationshipNotificationSession extends 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.
Modifier and Type | Method and Description |
---|---|
boolean |
canRegisterForResourceRelationshipNotifications()
Tests if this user can register for
ResourceRelationship
notifications. |
Bin |
getBin()
Gets the
Bin associated with this session. |
Id |
getBinId()
Gets the
Bin Id associated with this
session. |
void |
registerForChangedResourceRelationship(Id resourceRelationshipId)
Registers for notification of an updated relationship.
|
void |
registerForChangedResourceRelationships()
Registers for notification of updated relationships.
|
void |
registerForChangedResourceRelationshipsByGenusType(Type resourceRelationshipGenusType)
Register for notifications of changed relationshipsof the given genus
type.
|
void |
registerForChangedResourceRelationshipsForDestinationResource(Id resourceId)
Register for notifications of changed relationships to the given
resource.
|
void |
registerForChangedResourceRelationshipsForSourceResource(Id resourceId)
Register for notifications of changed relationships from the given
resource.
|
void |
registerForDeletedResourceRelationship(Id resourceRelationshipId)
Registers for notification of a deleted relationship.
|
void |
registerForDeletedResourceRelationships()
Registers for notification of deleted relationships.
|
void |
registerForDeletedResourceRelationshipsByGenusType(Type resourceRelationshipGenusType)
Register for notifications of deleted relationships of the given genus
type.
|
void |
registerForDeletedResourceRelationshipsForDestinationResource(Id resourceId)
Register for notifications of deleted relationships to the given
resource.
|
void |
registerForDeletedResourceRelationshipsForSourceResource(Id resourceId)
Register for notifications of deleted relationships from the given
resource.
|
void |
registerForNewResourceRelationships()
Register for notifications of new relationship.
|
void |
registerForNewResourceRelationshipsByGenusType(Type resourceRelationshipGenusType)
Register for notifications of new relationships of the given genus
type.
|
void |
registerForNewResourceRelationshipsForDestinationResource(Id resourceId)
Register for notifications of new relationships to the given resource.
|
void |
registerForNewResourceRelationshipsForSourceResource(Id resourceId)
Register for notifications of new relationships from the given
resource.
|
void |
useFederatedBinView()
Federates the view for methods in this session.
|
void |
useIsolatedBinView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getBinId()
Bin
Id
associated with this
session. Bin Id
associated with this sessionmandatory
- This method must be implemented. Bin getBin() throws OperationFailedException, PermissionDeniedException
Bin
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForResourceRelationshipNotifications()
ResourceRelationship
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 useFederatedBinView()
mandatory
- This method is must be implemented. void useIsolatedBinView()
mandatory
- This method is must be implemented. void registerForNewResourceRelationships() throws OperationFailedException, PermissionDeniedException
ResourceRelationshipReceiver.newResourceRelationships()
is
invoked when a new relationship is created.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewResourceRelationshipsByGenusType(Type resourceRelationshipGenusType) throws OperationFailedException, PermissionDeniedException
ResourceRelationshipReceiver.newResourceRelationships()
is invoked when a new relationship is created.resourceRelationshipGenusType
- the rsource relationship genus
typeNullArgumentException
-
resourceRelationshipGenusType is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewResourceRelationshipsForSourceResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
ResourceRelationshipReceiver.newResourceRelationships()
is
invoked when a new relationship is created.resourceId
- the Id
of the Resource
to monitorNullArgumentException
- resourceId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewResourceRelationshipsForDestinationResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
ResourceRelationshipReceiver.newResourceRelationships()
is invoked when a new relationship is created.resourceId
- the Id
of the Resource
to monitorNullArgumentException
- resourceId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedResourceRelationships() throws OperationFailedException, PermissionDeniedException
ResourceRelationshipReceiver.changedResourceRelationships()
is
invoked when a relationship is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedResourceRelationshipsByGenusType(Type resourceRelationshipGenusType) throws OperationFailedException, PermissionDeniedException
ResourceRelationshipReceiver.changedResourceRelationships()
is
invoked when a relationship is changed.resourceRelationshipGenusType
- the rsource relationship genus
typeNullArgumentException
-
resourceRelationshipGenusType is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedResourceRelationshipsForSourceResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
ResourceRelationshipReceiver.changedResourceRelationships()
is
invoked when a relationship is changed.resourceId
- the Id
of the Resource
to monitorNullArgumentException
- resourceId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedResourceRelationshipsForDestinationResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
ResourceRelationshipReceiver.changedResourceRelationships()
is
invoked when a relationship is changed.resourceId
- the Id
of the Resource
to monitorNullArgumentException
- resourceId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedResourceRelationship(Id resourceRelationshipId) throws OperationFailedException, PermissionDeniedException
ResourceRelationshipReceiver.changedResourceRelationships()
is
invoked when the specified relationship is changed.resourceRelationshipId
- the Id
of the
ResourceRelationship
to monitorNullArgumentException
- resourceRelationshipId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedResourceRelationships() throws OperationFailedException, PermissionDeniedException
ResourceRelationshipReceiver.deletedResourceRelationships()
is
invoked when a relationship is deleted.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedResourceRelationshipsByGenusType(Type resourceRelationshipGenusType) throws OperationFailedException, PermissionDeniedException
ResourceRelationshipReceiver.deletedResourceRelationships()
is
invoked when a relationship is deleted.resourceRelationshipGenusType
- the rsource relationship genus
typeNullArgumentException
-
resourceRelationshipGenusType is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedResourceRelationshipsForSourceResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
ResourceRelationshipReceiver.deletedResourceRelationships()
is
invoked when a relationship is deleted.resourceId
- the Id
of the Resource
to monitorNullArgumentException
- resourceRelationshipId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedResourceRelationshipsForDestinationResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
ResourceRelationshipReceiver.deletedResourceRelationships()
is
invoked when a relationship is deleted.resourceId
- the Id
of the Resource
to monitorNullArgumentException
- resourceRelationshipId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedResourceRelationship(Id resourceRelationshipId) throws OperationFailedException, PermissionDeniedException
ResourceRelationshipReceiver.changedResourceRelationships()
is
invoked when the specified relationship is deleted.resourceRelationshipId
- the Id
of the
ResourceRelationship
to monitorNullArgumentException
- resourceRelationshipId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.