public interface QueueNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Queue
objects in this Distributor.
This
also includes existing queues that may appear or disappear due to changes
in the Distributor
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
QueueLookupSession.
Modifier and Type | Method and Description |
---|---|
boolean |
canRegisterForQueueNotifications()
Tests if this user can register for
Queue
notifications. |
Distributor |
getDistributor()
Gets the
Distributor associated with this session. |
Id |
getDistributorId()
Gets the
Distributor Id associated with
this session. |
void |
registerForChangedQueue(Id queueId)
Registers for notification of an updated queue.
|
void |
registerForChangedQueues()
Registers for notification of updated queues.
|
void |
registerForChangedQueuesForBroker(Id brokerId)
Registers for notification of updated queues in the given broker.
|
void |
registerForDeletedQueue(Id queueId)
Registers for notification of a deleted queue.
|
void |
registerForDeletedQueues()
Registers for notification of deleted queues.
|
void |
registerForDeletedQueuesForBroker(Id brokerId)
Registers for notification of deleted queues in the given broker.
|
void |
registerForNewQueues()
Register for notifications of new queues.
|
void |
registerForNewQueuesForBroker(Id brokerId)
Register for notifications of new queues in the given broker.
|
void |
useFederatedDistributorView()
Federates the view for methods in this session.
|
void |
useIsolatedDistributorView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getDistributorId()
Distributor
Id
associated with
this session. Distributor Id
associated with this sessionmandatory
- This method must be implemented. Distributor getDistributor() throws OperationFailedException, PermissionDeniedException
Distributor
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForQueueNotifications()
Queue
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 useFederatedDistributorView()
mandatory
- This method is must be implemented. void useIsolatedDistributorView()
mandatory
- This method is must be implemented. void registerForNewQueues() throws OperationFailedException, PermissionDeniedException
QueueReceiver.newQueues()
is invoked when a new Queue
appears in this distributor.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewQueuesForBroker(Id brokerId) throws OperationFailedException, PermissionDeniedException
QueueReceiver.newQueues()
is invoked when a new Queue
appears in this distributor.brokerId
- the Id
of the broker to monitorNullArgumentException
- brokerId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedQueues() throws OperationFailedException, PermissionDeniedException
QueueReceiver.changedQueues()
is invoked when a queue in this
distributor is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedQueuesForBroker(Id brokerId) throws OperationFailedException, PermissionDeniedException
QueueReceiver.changedQueues()
is invoked when a queue
in this distributor is changed.brokerId
- the Id
of the broker to monitorNullArgumentException
- brokerId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedQueue(Id queueId) throws OperationFailedException, PermissionDeniedException
ProvisionableReceiver.changedQueues()
is invoked when the
specified queue in this distributor is changed.queueId
- the Id
of the Queue
to
monitorNullArgumentException
- queueId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedQueues() throws OperationFailedException, PermissionDeniedException
QueueReceiver.deletedQueues()
is invoked when a queue is
deleted or removed from this distributor.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedQueuesForBroker(Id brokerId) throws OperationFailedException, PermissionDeniedException
QueueReceiver.deletedQueues()
is invoked when a queue
is deleted or removed from this distributor.brokerId
- the Id
of the broker to monitorNullArgumentException
- brokerId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedQueue(Id queueId) throws OperationFailedException, PermissionDeniedException
QueueReceiver.deletedQueues()
is invoked when the specified
queue is deleted or removed from this distributor.queueId
- the Id
of the Queue
to
monitorNullArgumentException
- queueId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.