public interface RelationshipNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Relationship
objects in this Family.
This
also includes existing relationships that may appear or disappear due to
changes in the Family
hierarchy, 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 two views defined in this session correspond to the views in the
RelationshipLookupSession.
Modifier and Type | Method and Description |
---|---|
void |
acknowledgeRelationshipNotification(Id notificationId)
Acknowledge a relationship notification.
|
boolean |
canRegisterForRelationshipNotifications()
Tests if this user can register for
Relationship
notifications. |
Family |
getFamily()
Gets the
Family associated with this session. |
Id |
getFamilyId()
Gets the
Family Id associated with this
session. |
void |
registerForChangedRelationship(Id relationshipId)
Registers for notification of an updated relationship.
|
void |
registerForChangedRelationships()
Registers for notification of updated relationships.
|
void |
registerForChangedRelationshipsByGenusType(Type relationshipGenusType)
Register for notifications of updated relationships.
|
void |
registerForChangedRelationshipsForDestination(Id destinationId)
Register for notifications of updated relationships to the given
destination node.
|
void |
registerForChangedRelationshipsForSource(Id sourceId)
Register for notifications of updated relationships from the given
source node.
|
void |
registerForDeletedRelationship(Id relationshipId)
Registers for notification of a deleted relationship.
|
void |
registerForDeletedRelationships()
Registers for notification of deleted relationships.
|
void |
registerForDeletedRelationshipsByGenusType(Type relationshipGenusType)
Register for notifications of deleted relationships.
|
void |
registerForDeletedRelationshipsForDestination(Id destinationId)
Register for notifications of deleted relationships to the given
destination node.
|
void |
registerForDeletedRelationshipsForSource(Id sourceId)
Register for notifications of deleted relationships from the given
source node.
|
void |
registerForNewRelationships()
Register for notifications of new relationships.
|
void |
registerForNewRelationshipsByGenusType(Type relationshipGenusType)
Register for notifications of new relationships.
|
void |
registerForNewRelationshipsForDestination(Id destinationId)
Register for notifications of new relationships to the given
destination.
|
void |
registerForNewRelationshipsForSource(Id sourceId)
Register for notifications of new relationships from the given source.
|
void |
reliableRelationshipNotifications()
Reliable notifications are desired.
|
void |
unreliableRelationshipNotifications()
Unreliable notifications are desired.
|
void |
useFederatedFamilyView()
Federates the view for methods in this session.
|
void |
useIsolatedFamilyView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getFamilyId()
Family
Id
associated with this
session. Family Id
associated with this sessionmandatory
- This method must be implemented. Family getFamily() throws OperationFailedException, PermissionDeniedException
Family
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForRelationshipNotifications()
Relationship
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 useFederatedFamilyView()
mandatory
- This method is must be implemented. void useIsolatedFamilyView()
mandatory
- This method is must be implemented. void reliableRelationshipNotifications()
acknowledgeRelationshipNotification()
.mandatory
- This method is must be implemented. void unreliableRelationshipNotifications()
mandatory
- This method is must be implemented. void acknowledgeRelationshipNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
notificationId
- the Id
of the notificationOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewRelationships() throws OperationFailedException, PermissionDeniedException
RelationshipReceiver.newRelationships()
is invoked when a new
Relationship
appears in this family.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewRelationshipsForSource(Id sourceId) throws OperationFailedException, PermissionDeniedException
RelationshipReceiver.newRelationships()
is invoked when
a new Relationship
appears for the given peer.sourceId
- the Id
of the source to monitorNullArgumentException
- sourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewRelationshipsForDestination(Id destinationId) throws OperationFailedException, PermissionDeniedException
RelationshipReceiver.newRelationships()
is
invoked when a new Relationship
appears for the given
peer.destinationId
- the Id
of the destination node to
monitorNullArgumentException
- destinationId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewRelationshipsByGenusType(Type relationshipGenusType) throws OperationFailedException, PermissionDeniedException
RelationshipReceiver.newRelationships()
is invoked when a new
Relationship
appears for the given peer.relationshipGenusType
- the genus type of the
Relationship
to monitorNullArgumentException
- relationshipGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedRelationships() throws OperationFailedException, PermissionDeniedException
RelationshipReceiver.changedRelationships()
is invoked when a
relationship in this family is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedRelationshipsForSource(Id sourceId) throws OperationFailedException, PermissionDeniedException
RelationshipReceiver.changedRelationships()
is invoked when a Relationship
if changed for
the given peer.sourceId
- the Id
of the source node to monitorNullArgumentException
- sourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedRelationshipsForDestination(Id destinationId) throws OperationFailedException, PermissionDeniedException
RelationshipReceiver.changedRelationships()
is invoked when a Relationship
if changed for
the given peer.destinationId
- the Id
of the destination node to
monitorNullArgumentException
- destinationId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedRelationshipsByGenusType(Type relationshipGenusType) throws OperationFailedException, PermissionDeniedException
RelationshipReceiver.changedRelationships()
is invoked when a
Relationship
if changed for the given peer.relationshipGenusType
- the genus type of the
Relationship
to monitorNullArgumentException
- relationshipGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedRelationship(Id relationshipId) throws OperationFailedException, PermissionDeniedException
RelationshipReceiver.changedRelationships()
is invoked when
the specified relationship in this family is changed.relationshipId
- the Id
of the
Relationship
to monitorNullArgumentException
- relationshipId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedRelationships() throws OperationFailedException, PermissionDeniedException
RelationshipReceiver.deletedRelationships()
is invoked when a
relationship is deleted or removed from this family.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedRelationshipsForSource(Id sourceId) throws OperationFailedException, PermissionDeniedException
RelationshipReceiver.deletedRelationships()
is invoked when a Relationship
if removed for
the given peer.sourceId
- the Id
of the source node to monitorNullArgumentException
- sourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedRelationshipsForDestination(Id destinationId) throws OperationFailedException, PermissionDeniedException
RelationshipReceiver.deletedRelationships()
is invoked when a Relationship
if removed for
the given peer.destinationId
- the Id
of the destination node to
monitorNullArgumentException
- destinationId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedRelationshipsByGenusType(Type relationshipGenusType) throws OperationFailedException, PermissionDeniedException
RelationshipReceiver.deletedRelationships()
is invoked when a
Relationship
if removed for the given peer.relationshipGenusType
- the genus type of the
Relationship
to monitorNullArgumentException
- relationshipGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedRelationship(Id relationshipId) throws OperationFailedException, PermissionDeniedException
RelationshipReceiver.deletedRelationships()
is invoked when
the specified relationship is deleted or removed from this family.relationshipId
- the Id
of the
Relationship
to monitorNullArgumentException
- relationshipId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.