Interface InstallationNotificationSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods to receive asynchronous notifications on
adds/changes to Installations . 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 TypeMethodDescriptionvoidacknowledgeInstallationNotification(Id notificationId) Acknowledge an installation notification.booleanTests if this user can register forInstallationnotifications.getSite()Gets theSiteassociated with this session.Gets theSiteIdassociated with this session.voidregisterForDeletedInstallation(Id installationId) Registers for notification of a deleted installation.voidRegisters for notification of deleted installations.voidRegister for notifications of new installations.voidReliable notifications are desired.voidUnreliable notifications are desired.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
-
getSiteId
Id getSiteId()Gets theSiteIdassociated with this session.- Returns:
- the
Site Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getSite
Gets theSiteassociated with this session.- Returns:
- the
Siteassociated with this session - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canRegisterForInstallationNotifications
boolean canRegisterForInstallationNotifications()Tests if this user can register forInstallationnotifications. 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 not offer notification functions to unauthorized users.- Returns:
falseif notification methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
reliableInstallationNotifications
void reliableInstallationNotifications()Reliable notifications are desired. In reliable mode, notifications are to be acknowledged usingacknowledgeInstallationNotification().- Compliance:
mandatory- This method is must be implemented.
-
unreliableInstallationNotifications
void unreliableInstallationNotifications()Unreliable notifications are desired. In unreliable mode, notifications do not need to be acknowledged.- Compliance:
mandatory- This method is must be implemented.
-
acknowledgeInstallationNotification
void acknowledgeInstallationNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException Acknowledge an installation notification.- Parameters:
notificationId- theIdof the notification- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewInstallations
Register for notifications of new installations.InstallationReceiver.newInstallations()is invoked when a new installation is installed.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedInstallations
Registers for notification of deleted installations.InstallationReceiver.deletedInstallations()is invoked when an installation is removed.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedInstallation
void registerForDeletedInstallation(Id installationId) throws OperationFailedException, PermissionDeniedException Registers for notification of a deleted installation.InstallationReceiver.deletedInstallations()is invoked when the specified installation is removed.- Parameters:
installationId- theIdof theInstallationto monitor- Throws:
NullArgumentException-installationId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-