public interface NodeNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Node
objects in this Graph.
This also
includes existing nodes that may appear or disappear due to changes in the
Graph
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
NodeLookupSession.
Modifier and Type | Method and Description |
---|---|
void |
acknowledgeNodeNotification(Id notificationId)
Acknowledge a node notification.
|
boolean |
canRegisterForNodeNotifications()
Tests if this user can register for
Node notifications. |
Graph |
getGraph()
Gets the
Graph associated with this session. |
Id |
getGraphId()
Gets the
Graph Id associated with this
session. |
void |
registerForChangedNode(Id nodeId)
Registers for notification of an updated node.
|
void |
registerForChangedNodes()
Registers for notification of updated nodes.
|
void |
registerForDeletedNode(Id nodeId)
Registers for notification of a deleted node.
|
void |
registerForDeletedNodes()
Registers for notification of deleted nodes.
|
void |
registerForNewNodes()
Register for notifications of new nodes.
|
void |
reliableNodeNotifications()
Reliable notifications are desired.
|
void |
unreliableNodeNotifications()
Unreliable notifications are desired.
|
void |
useFederatedGraphView()
Federates the view for methods in this session.
|
void |
useIsolatedGraphView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getGraphId()
Graph
Id
associated with this
session. Graph Id
associated with this sessionmandatory
- This method must be implemented. Graph getGraph() throws OperationFailedException, PermissionDeniedException
Graph
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForNodeNotifications()
Node
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 useFederatedGraphView()
mandatory
- This method is must be implemented. void useIsolatedGraphView()
mandatory
- This method is must be implemented. void reliableNodeNotifications()
acknowledgeNodeNotification()
.mandatory
- This method is must be implemented. void unreliableNodeNotifications()
mandatory
- This method is must be implemented. void acknowledgeNodeNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
notificationId
- the Id
of the notificationOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewNodes() throws OperationFailedException, PermissionDeniedException
NodeReceiver.newNodes()
is invoked when a new Node
appears in this graph.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedNodes() throws OperationFailedException, PermissionDeniedException
NodeReceiver.changedNodes()
is invoked when a node in this
graph is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedNode(Id nodeId) throws OperationFailedException, PermissionDeniedException
NodeReceiver.changedNodes()
is invoked when the specified node
in this graph is changed.nodeId
- the Id
of the Node
to
monitorNullArgumentException
- nodeId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedNodes() throws OperationFailedException, PermissionDeniedException
NodeReceiver.deletedNodes()
is invoked when a node is deleted
or removed from this graph.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedNode(Id nodeId) throws OperationFailedException, PermissionDeniedException
NodeReceiver.deletedNodes()
is invoked when the specified node
is deleted or removed from this graph.nodeId
- the Id
of the Node
to
monitorNullArgumentException
- nodeId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.