Interface MyProvisionNotificationSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods to receive notifications on adds/changes
to Provision objects in this Distributor for resources
related to the authenticated agent.This also includes existing provisions
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.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can register forProvisionnotifications.Gets theDistributorassociated with this session.Gets theDistributorIdassociated with this session.voidRegisters for notification of updated provisions for resources related to the authenticated agent.voidregisterForChangedProvisionsForBroker(Id brokerId) Register for notifications of updated provisions for the given brokerIdfor resources related to the authenticated agent.voidRegister for notifications of updated provisions for the given poolIdfor resources related to the authenticated agent.voidregisterForChangedProvisionsForQueue(Id queueId) Register for notifications of updated provisions for the given queueIdfor resources related to the authenticated agent.voidRegisters for notification of deleted provisions for resources related to the authenticated agent.voidregisterForDeletedProvisionsForBroker(Id brokerId) Register for notifications of deleted provisions for the given brokerIdfor resources related to the authenticated agent.voidRegister for notifications of deleted provisions for the given poolIdfor resources related to the authenticated agent.voidregisterForDeletedProvisionsForQueue(Id queueId) Register for notifications of deleted provisions for the given queueIdfor resources related to the authenticated agent.voidRegister for notifications of new provisions for resources related to the authenticated agent.voidregisterForNewProvisionsForBroker(Id brokerId) Register for notifications of new provisions for the given brokerIdfor resources related to the authenticated agent.voidregisterForNewProvisionsForPool(Id poolId) Register for notifications of new provisions for the given poolIdfor resources related to the authenticated agent.voidregisterForNewProvisionsForQueue(Id queueId) Register for notifications of new provisions for the given queueIdfor resources related to the authenticated agent.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getDistributorId
Id getDistributorId()Gets theDistributorIdassociated with this session.- Returns:
- the
Distributor Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getDistributor
Gets theDistributorassociated with this session.- Returns:
- the distributor
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canRegisterForProvisionNotifications
boolean canRegisterForProvisionNotifications()Tests if this user can register forProvisionnotifications. 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer notification operations.- Returns:
falseif notification methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
registerForNewProvisions
Register for notifications of new provisions for resources related to the authenticated agent.ProvisionReceiver.newProvision()is invoked when a newProvisionappears in this distributor.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewProvisionsForPool
void registerForNewProvisionsForPool(Id poolId) throws OperationFailedException, PermissionDeniedException Register for notifications of new provisions for the given poolIdfor resources related to the authenticated agent.ProvisionReceiver.newProvision()is invoked when a newProvisionis created.- Parameters:
poolId- theIdof the pool to monitor- Throws:
NullArgumentException-poolIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewProvisionsForQueue
void registerForNewProvisionsForQueue(Id queueId) throws OperationFailedException, PermissionDeniedException Register for notifications of new provisions for the given queueIdfor resources related to the authenticated agent.ProvisionReceiver.newProvision()is invoked when a newProvisionis created.- Parameters:
queueId- theIdof the queue to monitor- Throws:
NullArgumentException-queueIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewProvisionsForBroker
void registerForNewProvisionsForBroker(Id brokerId) throws OperationFailedException, PermissionDeniedException Register for notifications of new provisions for the given brokerIdfor resources related to the authenticated agent.ProvisionReceiver.newProvision()is invoked when a newProvisionis created.- Parameters:
brokerId- theIdof the broker to monitor- Throws:
NullArgumentException-brokerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedProvisions
Registers for notification of updated provisions for resources related to the authenticated agent.ProvisionReceiver.changedProvision()is invoked when a provision in this distributor is changed.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedProvisionsForPool
void registerForChangedProvisionsForPool(Id poolId) throws OperationFailedException, PermissionDeniedException Register for notifications of updated provisions for the given poolIdfor resources related to the authenticated agent.ProvisionReceiver.changedProvision()is invoked when a provision in this distributor is changed.- Parameters:
poolId- theIdof the pool to monitor- Throws:
NullArgumentException-poolIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedProvisionsForQueue
void registerForChangedProvisionsForQueue(Id queueId) throws OperationFailedException, PermissionDeniedException Register for notifications of updated provisions for the given queueIdfor resources related to the authenticated agent.ProvisionReceiver.changedProvision()is invoked when a provision in this distributor is changed.- Parameters:
queueId- theIdof the queue to monitor- Throws:
NullArgumentException-queueIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedProvisionsForBroker
void registerForChangedProvisionsForBroker(Id brokerId) throws OperationFailedException, PermissionDeniedException Register for notifications of updated provisions for the given brokerIdfor resources related to the authenticated agent.ProvisionReceiver.changedProvision()is invoked when a provision in this distributor is changed.- Parameters:
brokerId- theIdof the broker to monitor- Throws:
NullArgumentException-brokerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedProvisions
Registers for notification of deleted provisions for resources related to the authenticated agent.ProvisionReceiver.deletedProvision()is invoked when a provision is deleted or removed from this distributor.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedProvisionsForPool
void registerForDeletedProvisionsForPool(Id poolId) throws OperationFailedException, PermissionDeniedException Register for notifications of deleted provisions for the given poolIdfor resources related to the authenticated agent.ProvisionReceiver.deletedProvision()is invoked when a provision in this distributor is removed or deleted.- Parameters:
poolId- theIdof the pool to monitor- Throws:
NullArgumentException-poolIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedProvisionsForQueue
void registerForDeletedProvisionsForQueue(Id queueId) throws OperationFailedException, PermissionDeniedException Register for notifications of deleted provisions for the given queueIdfor resources related to the authenticated agent.ProvisionReceiver.deletedProvision()is invoked when a provision in this distributor is removed or deleted.- Parameters:
queueId- theIdof the queue to monitor- Throws:
NullArgumentException-queueIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedProvisionsForBroker
void registerForDeletedProvisionsForBroker(Id brokerId) throws OperationFailedException, PermissionDeniedException Register for notifications of deleted provisions for the given brokerIdfor resources related to the authenticated agent.ProvisionReceiver.deletedProvision()is invoked when a provision in this distributor is removed or deleted.- Parameters:
brokerId- theIdof the vroker to monitor- Throws:
NullArgumentException-queueIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-