Interface ProvisionNotificationSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods to receive notifications on adds/changes
to Provision objects in this Distributor . 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.
The two views defined in this session correspond to the views in the
ProvisionLookupSession .
-
Method Summary
Modifier and TypeMethodDescriptionvoidacknowledgeProvisionNotification(Id notificationId) Acknowledge a provision notification.booleanTests if this user can register forProvisionnotifications.Gets theDistributorassociated with this session.Gets theDistributorIdassociated with this session.voidregisterForChangedProvision(Id provisionId) Registers for notification of an updated provision.voidRegisters for notification of updated provisions.voidregisterForChangedProvisionsForBroker(Id brokerId) Register for notifications of updated provisions for the given brokerId.voidregisterForChangedProvisionsForProvisionable(Id provisionableId) Register for notifications of updated provisions for the given provisionableId.voidregisterForChangedProvisionsForRecipient(Id resourceId) Register for notifications of updated provisions for the given recipientId.voidregisterForChangedProvisionsForRequest(Id requestId) Register for notifications of updated provisions for the given requestId.voidregisterForDeletedProvision(Id provisionId) Registers for notification of a deleted provision.voidRegisters for notification of deleted provisions.voidregisterForDeletedProvisionsForBroker(Id brokerId) Register for notifications of deleted provisions for the given brokerId.voidregisterForDeletedProvisionsForProvisionable(Id provisionableId) Register for notifications of deleted provisions for the given provisionableId.voidregisterForDeletedProvisionsForRecipient(Id resourceId) Register for notifications of deleted provisions for the given recipientId.voidregisterForDeletedProvisionsForRequest(Id requestId) Register for notifications of deleted provisions for the given requestId.voidRegister for notifications of new provisions.voidregisterForNewProvisionsForBroker(Id brokerId) Register for notifications of new provisions for the given brokerId.voidregisterForNewProvisionsForProvisionable(Id provisionableId) Register for notifications of new provisions for the given provisionableId.voidregisterForNewProvisionsForRecipient(Id resourceId) Register for notifications of new provisions for the given resourceId.voidregisterForNewProvisionsForRequest(Id requestId) Register for notifications of new provisions for the given requestId.voidReliable notifications are desired.voidUnreliable notifications are desired.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.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.
-
useFederatedDistributorView
void useFederatedDistributorView()Federates the view for methods in this session. A federated view will include provisions in distributors which are children of this distributor in the distributor hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedDistributorView
void useIsolatedDistributorView()Isolates the view for methods in this session. An isolated view restricts notifications to this distributor only.- Compliance:
mandatory- This method is must be implemented.
-
reliableProvisionNotifications
void reliableProvisionNotifications()Reliable notifications are desired. In reliable mode, notifications are to be acknowledged usingacknowledgeProvisionNotification().- Compliance:
mandatory- This method is must be implemented.
-
unreliableProvisionNotifications
void unreliableProvisionNotifications()Unreliable notifications are desired. In unreliable mode, notifications do not need to be acknowledged.- Compliance:
mandatory- This method is must be implemented.
-
acknowledgeProvisionNotification
void acknowledgeProvisionNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException Acknowledge a provision notification.- Parameters:
notificationId- theIdof the notification- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewProvisions
Register for notifications of new provisions.ProvisionReceiver.newProvisions()is invoked when a newProvisionappears in this distributor.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewProvisionsForRequest
void registerForNewProvisionsForRequest(Id requestId) throws OperationFailedException, PermissionDeniedException Register for notifications of new provisions for the given requestId.ProvisionReceiver.newProvisions()is invoked when a newProvisionis created.- Parameters:
requestId- theIdof the request to monitor- Throws:
NullArgumentException-requestIdisnullOperationFailedException- 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 brokerId.ProvisionReceiver.newProvisions()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.
-
registerForNewProvisionsForProvisionable
void registerForNewProvisionsForProvisionable(Id provisionableId) throws OperationFailedException, PermissionDeniedException Register for notifications of new provisions for the given provisionableId.ProvisionReceiver.newProvisions()is invoked when a newProvisionis created.- Parameters:
provisionableId- theIdof the provisionable to monitor- Throws:
NullArgumentException-provisionableIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewProvisionsForRecipient
void registerForNewProvisionsForRecipient(Id resourceId) throws OperationFailedException, PermissionDeniedException Register for notifications of new provisions for the given resourceId.ProvisionReceiver.newProvisions()is invoked when a newProvisionis created.- Parameters:
resourceId- theIdof the recipient to monitor- Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedProvisions
Registers for notification of updated provisions.ProvisionReceiver.changedProvisions()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.
-
registerForChangedProvisionsForRequest
void registerForChangedProvisionsForRequest(Id requestId) throws OperationFailedException, PermissionDeniedException Register for notifications of updated provisions for the given requestId.ProvisionReceiver.changedProvisions()is invoked when a provision in this distributor is changed.- Parameters:
requestId- theIdof the request to monitor- Throws:
NullArgumentException-requestIdisnullOperationFailedException- 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 brokerId.ProvisionReceiver.changedProvisions()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.
-
registerForChangedProvisionsForProvisionable
void registerForChangedProvisionsForProvisionable(Id provisionableId) throws OperationFailedException, PermissionDeniedException Register for notifications of updated provisions for the given provisionableId.ProvisionReceiver.changedProvisions()is invoked when a provision in this distributor is changed.- Parameters:
provisionableId- theIdof the provisionable to monitor- Throws:
NullArgumentException-provisionableIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedProvisionsForRecipient
void registerForChangedProvisionsForRecipient(Id resourceId) throws OperationFailedException, PermissionDeniedException Register for notifications of updated provisions for the given recipientId.ProvisionReceiver.changedProvisions()is invoked when a provision in this distributor is changed.- Parameters:
resourceId- theIdof the recipient to monitor- Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedProvision
void registerForChangedProvision(Id provisionId) throws OperationFailedException, PermissionDeniedException Registers for notification of an updated provision.ProvisionReceiver.changedProvisions()is invoked when the specified provision in this distributor is changed.- Parameters:
provisionId- theIdof theProvisionto monitor- Throws:
NullArgumentException-provisionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedProvisions
Registers for notification of deleted provisions.ProvisionReceiver.deletedProvisions()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.
-
registerForDeletedProvisionsForRequest
void registerForDeletedProvisionsForRequest(Id requestId) throws OperationFailedException, PermissionDeniedException Register for notifications of deleted provisions for the given requestId.ProvisionReceiver.deletedProvisions()is invoked when a provision in this distributor is removed or deleted.- Parameters:
requestId- theIdof the request to monitor- Throws:
NullArgumentException-requestIdisnullOperationFailedException- 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 brokerId.ProvisionReceiver.deletedProvisions()is invoked when a provision in this distributor is removed or deleted.- Parameters:
brokerId- theIdof the broker to monitor- Throws:
NullArgumentException-brokerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedProvisionsForProvisionable
void registerForDeletedProvisionsForProvisionable(Id provisionableId) throws OperationFailedException, PermissionDeniedException Register for notifications of deleted provisions for the given provisionableId.ProvisionReceiver.deletedProvisions()is invoked when a provision in this distributor is removed or deleted.- Parameters:
provisionableId- theIdof the provisionable to monitor- Throws:
NullArgumentException-provisionableIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedProvisionsForRecipient
void registerForDeletedProvisionsForRecipient(Id resourceId) throws OperationFailedException, PermissionDeniedException Register for notifications of deleted provisions for the given recipientId.ProvisionReceiver.deletedProvisions()is invoked when a provision in this distributor is removed or deleted.- Parameters:
resourceId- theIdof the recipient to monitor- Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedProvision
void registerForDeletedProvision(Id provisionId) throws OperationFailedException, PermissionDeniedException Registers for notification of a deleted provision.ProvisionReceiver.deletedProvisions()is invoked when the specified provision is deleted or removed from this distributor.- Parameters:
provisionId- theIdof theProvisionto monitor- Throws:
NullArgumentException-provisionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-