public interface AgentNotificationSession extends OsidSession
This session defines methods to receive asynchronous notifications on
adds/changes to Agent
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.
The two views defined in this session correspond to the views in the
AgentLookupSession.
Modifier and Type | Method and Description |
---|---|
void |
acknowledgeAgentNotification(Id notificationId)
Acknowledge an agent notification.
|
boolean |
canRegisterForAgentNotifications()
Tests if this user can register for
Agent
notifications. |
Agency |
getAgency()
Gets the
Agency associated with this session. |
Id |
getAgencyId()
Gets the
Agency Id associated with this
session. |
void |
registerForChangedAgent(Id agentId)
Registers for notification of an updated agent.
|
void |
registerForChangedAgents()
Registers for notification of updated agents.
|
void |
registerForDeletedAgent(Id agentId)
Registers for notification of a deleted agent.
|
void |
registerForDeletedAgents()
Registers for notification of deleted agents.
|
void |
registerForNewAgents()
Register for notifications of new agents.
|
void |
reliableAgentNotifications()
Reliable notifications are desired.
|
void |
unreliableAgentNotifications()
Unreliable notifications are desired.
|
void |
useFederatedAgencyView()
Federates the view for methods in this session.
|
void |
useIsolatedAgencyView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getAgencyId()
Agency
Id
associated with this
session. Agency Id
associated with this sessionmandatory
- This method must be implemented. Agency getAgency() throws OperationFailedException, PermissionDeniedException
Agency
associated with this session. Agency
associated with this sessionOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForAgentNotifications()
Agent
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 useFederatedAgencyView()
mandatory
- This method is must be implemented. void useIsolatedAgencyView()
mandatory
- This method is must be implemented. void reliableAgentNotifications()
acknowledgeAgentNotification()
.mandatory
- This method is must be implemented. void unreliableAgentNotifications()
mandatory
- This method is must be implemented. void acknowledgeAgentNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
notificationId
- the Id
of the notificationOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewAgents() throws OperationFailedException, PermissionDeniedException
AgentReceiver.newAgents()
is invoked when a new Agent
is created.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedAgents() throws OperationFailedException, PermissionDeniedException
AgentReceiver.changedAgents()
is invoked when an agent is
changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedAgent(Id agentId) throws OperationFailedException, PermissionDeniedException
AgentReceiver.changedAgents()
is invoked when the specified
agent is changed.agentId
- the Id
of the Agent
to
monitorNullArgumentException
- agentId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedAgents() throws OperationFailedException, PermissionDeniedException
AgentReceiver.deletedAgents()
is invoked when an agent is
removed from this agency.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedAgent(Id agentId) throws OperationFailedException, PermissionDeniedException
AgentReceiver.deletedAgents()
is invoked when the specified
agent is removed from this agency.agentId
- the Id
of the Agent
to
monitorNullArgumentException
- agentId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.