public interface InstallationNotificationSession extends OsidSession
This session defines methods to receive asynchronous notifications on
adds/changes to Installation
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.
Modifier and Type | Method and Description |
---|---|
boolean |
canRegisterForInstallationNotifications()
Tests if this user can register for
Installation
notifications. |
Site |
getSite()
Gets the
Site associated with this session. |
Id |
getSiteId()
Gets the
Site Id associated with this
session. |
void |
registerForDeletedInstallation(Id installationId)
Registers for notification of a deleted installation.
|
void |
registerForDeletedInstallations()
Registers for notification of deleted installations.
|
void |
registerForNewInstallations()
Register for notifications of new installations.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getSiteId()
Site
Id
associated with this
session. Site Id
associated with this sessionmandatory
- This method must be implemented. Site getSite() throws OperationFailedException, PermissionDeniedException
Site
associated with this session. Site
associated with this sessionOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForInstallationNotifications()
Installation
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 not
offer notification functions to unauthorized users. false
if notification methods are not
authorized, true
otherwisemandatory
- This method must be implemented. void registerForNewInstallations() throws OperationFailedException, PermissionDeniedException
InstallationReceiver.newInstallations()
is invoked when a new
installation is installed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedInstallations() throws OperationFailedException, PermissionDeniedException
InstallationReceiver.deletedInstallations()
is invoked when a
installation is removed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedInstallation(Id installationId) throws OperationFailedException, PermissionDeniedException
InstallationReceiver.deletedInstallations()
is invoked when
the specified installation is removed.installationId
- the Id
of the
Installation
to monitorNullArgumentException
- installationId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.