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 |
---|---|
boolean |
canRegisterForGraphNotifications()
Tests if this user can register for
Graph
notifications. |
void |
registerForChangedGraph(Id graphId)
Registers for notification of an updated graph.
|
void |
registerForChangedGraphs()
Registers for notification of updated graphs.
|
void |
registerForDeletedGraph(Id graphId)
Registers for notification of a deleted graph.
|
void |
registerForDeletedGraphAncestors(Id graphId)
Registers for notification if an ancestor is removed from the
specified graph in the graph hierarchy.
|
void |
registerForDeletedGraphDescendants(Id graphId)
Registers for notification if a descendant is removed from fthe
specified graph in the graph hierarchy.
|
void |
registerForDeletedGraphs()
Registers for notification of deleted graphs.
|
void |
registerForNewGraphAncestors(Id graphId)
Registers for notification if an ancestor is added to the specified
graph in the graph hierarchy.
|
void |
registerForNewGraphDescendants(Id graphId)
Registers for notification if a descendant is added to the specified
graph in the graph hierarchy.
|
void |
registerForNewGraphs()
Register for notifications of new graphs.
|
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 registerForNewGraphs() throws OperationFailedException, PermissionDeniedException
GraphReceiver.newGraph()
is invoked when a new Graph
is created.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewGraphAncestors(Id graphId) throws OperationFailedException, PermissionDeniedException
GraphReceiver.newGraphAncestor()
is invoked when the specified graph experiences an addition in
ancestry.graphId
- the Id
of the graph to monitorNullArgumentException
- graphId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewGraphDescendants(Id graphId) throws OperationFailedException, PermissionDeniedException
GraphReceiver.newGraphDescendant()
is invoked when the
specified graph experiences an addition in descendants.graphId
- the Id
of the graph to monitorNullArgumentException
- graphId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedGraphs() throws OperationFailedException, PermissionDeniedException
GraphReceiver.changedGraph()
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.changedGraph()
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.deletedGraph()
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.deletedGraph()
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 registerForDeletedGraphAncestors(Id graphId) throws OperationFailedException, PermissionDeniedException
GraphReceiver.deletedGraphAncestor()
is invoked when the
specified graph experiences a removal of an ancestor.graphId
- the Id
of the graph to monitorNullArgumentException
- graphId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedGraphDescendants(Id graphId) throws OperationFailedException, PermissionDeniedException
GraphReceiver.deletedGraphDescednant()
is invoked when the
specified graph experiences a removal of one of its descdendents.graphId
- the Id
of the graph to monitorNullArgumentException
- graphId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.