public interface GraphNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Graph
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 |
---|---|
void |
acknowledgeGraphNotification(Id notificationId)
Acknowledge a graph notification.
|
boolean |
canRegisterForGraphNotifications()
Tests if this user can register for
Graph
notifications. |
void |
registerForChangedGraph(Id graphId)
Registers for notification of an updated graph.
|
void |
registerForChangedGraphHierarchy()
Registers for notification of an updated graph hierarchy structure.
|
void |
registerForChangedGraphHierarchyForAncestors(Id graphId)
Registers for notification of an updated graph hierarchy structure.
|
void |
registerForChangedGraphHierarchyForDescendants(Id graphId)
Registers for notification of an updated graph hierarchy structure.
|
void |
registerForChangedGraphs()
Registers for notification of updated graphs.
|
void |
registerForDeletedGraph(Id graphId)
Registers for notification of a deleted graph.
|
void |
registerForDeletedGraphs()
Registers for notification of deleted graphs.
|
void |
registerForNewGraphs()
Register for notifications of new graphs.
|
void |
reliableGraphNotifications()
Reliable notifications are desired.
|
void |
unreliableGraphNotifications()
Unreliable notifications are desired.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canRegisterForGraphNotifications()
Graph
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 reliableGraphNotifications()
acknowledgeGrapNotification()
.mandatory
- This method is must be implemented. void unreliableGraphNotifications()
mandatory
- This method is must be implemented. void acknowledgeGraphNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
notificationId
- the Id
of the notificationOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewGraphs() throws OperationFailedException, PermissionDeniedException
GraphReceiver.newGraphs()
is invoked when a new Graph
is created.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedGraphs() throws OperationFailedException, PermissionDeniedException
GraphReceiver.changedGraphs()
is invoked when a graph is
changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedGraph(Id graphId) throws OperationFailedException, PermissionDeniedException
GraphReceiver.changedGraphs()
is invoked when the specified
graph is changed.graphId
- the Id of the Graph
to monitorNullArgumentException
- graphId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedGraphs() throws OperationFailedException, PermissionDeniedException
GraphReceiver.deletedGraphs()
is invoked when a graph is
deleted.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedGraph(Id graphId) throws OperationFailedException, PermissionDeniedException
GraphReceiver.deletedGraphs()
is invoked when the specified
graph is deleted.graphId
- the Id
of the Graph
to
monitorNullArgumentException
- graphId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedGraphHierarchy() throws OperationFailedException, PermissionDeniedException
GraphReceiver.changedChildOfGraphs()
is invoked when a
node experiences a change in its children.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedGraphHierarchyForAncestors(Id graphId) throws OperationFailedException, PermissionDeniedException
GraphReceiver.changedChildOfGraphs()
is invoked when
the specified node or any of its ancestors experiences a change in its
children.graphId
- the Id
of the Graph
node
to monitorNullArgumentException
- graphId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedGraphHierarchyForDescendants(Id graphId) throws OperationFailedException, PermissionDeniedException
GraphReceiver.changedChildOfGraphs()
is invoked when
the specified node or any of its descendants experiences a change in
its children.graphId
- the Id
of the Graph
node
to monitorNullArgumentException
- graphId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.