Interface MailboxNotificationSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods to receive notifications on adds/changes
to Mailbox objects. This session is intended for consumers needing
to synchronize their message with this service without the use of polling.
Notifications are cancelled when this session is closed.
-
Method Summary
Modifier and TypeMethodDescriptionvoidacknowledgeMailboxNotification(Id notificationId) Acknowledge a mailbox notification.booleanTests if this user can register forMailboxnotifications.voidregisterForChangedMailbox(Id mailboxId) Registers for notification of an updated mailbox.voidRegisters for notification of updated mailboxes.voidRegisters for notification of an updated mailbox hierarchy structure.voidregisterForChangedMailboxHierarchyForAncestors(Id mailboxId) Registers for notification of an updated mailbox hierarchy structure.voidRegisters for notification of an updated mailbox hierarchy structure.voidregisterForDeletedMailbox(Id mailboxId) Registers for notification of a deleted mailbox.voidRegisters for notification of deleted mailboxes.voidRegister for notifications of new mailboxes.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
-
canRegisterForMailboxNotifications
boolean canRegisterForMailboxNotifications()Tests if this user can register forMailboxnotifications. 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.
-
reliableMailboxNotifications
void reliableMailboxNotifications()Reliable notifications are desired. In reliable mode, notifications are to be acknowledged usingacknowledgeMailboxNotification().- Compliance:
mandatory- This method is must be implemented.
-
unreliableMailboxNotifications
void unreliableMailboxNotifications()Unreliable notifications are desired. In unreliable mode, notifications do not need to be acknowledged.- Compliance:
mandatory- This method is must be implemented.
-
acknowledgeMailboxNotification
void acknowledgeMailboxNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException Acknowledge a mailbox notification.- Parameters:
notificationId- theIdof the notification- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewMailboxes
Register for notifications of new mailboxes.MailboxReceiver.newMailboxes()is invoked when a newMailboxis created.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedMailboxes
Registers for notification of updated mailboxes.MailboxReceiver.changedMailboxes()is invoked when a mailbox is changed.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedMailbox
void registerForChangedMailbox(Id mailboxId) throws OperationFailedException, PermissionDeniedException Registers for notification of an updated mailbox.MailboxReceiver.changedMailboxes()is invoked when the specified mailbox is changed.- Parameters:
mailboxId- theIdof the Mailbox to monitor- Throws:
NullArgumentException-mailboxIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedMailboxes
Registers for notification of deleted mailboxes.MailboxReceiver.deletedMailboxes()is invoked when a mailbox is deleted.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedMailbox
void registerForDeletedMailbox(Id mailboxId) throws OperationFailedException, PermissionDeniedException Registers for notification of a deleted mailbox.MailboxReceiver.deletedMailboxes()is invoked when the specified mailbox is deleted.- Parameters:
mailboxId- theIdof theMailboxto monitor- Throws:
NullArgumentException-mailboxIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedMailboxHierarchy
void registerForChangedMailboxHierarchy() throws OperationFailedException, PermissionDeniedExceptionRegisters for notification of an updated mailbox hierarchy structure.MailboxReceiver.changedChildOfMailboxess()is invoked when the specified node or any of its descendants experiences a change in its children.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedMailboxHierarchyForAncestors
void registerForChangedMailboxHierarchyForAncestors(Id mailboxId) throws OperationFailedException, PermissionDeniedException Registers for notification of an updated mailbox hierarchy structure.MailboxReceiver.changedChildOfMailboxess()is invoked when the specified node or any of its descendants experiences a change in its children.- Parameters:
mailboxId- theIdof theMailboxnode to monitor- Throws:
NullArgumentException-mailboxIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedMailboxHierarchyForDescendants
void registerForChangedMailboxHierarchyForDescendants(Id mailboxId) throws OperationFailedException, PermissionDeniedException Registers for notification of an updated mailbox hierarchy structure.MailboxReceiver.changedChildOfMailboxess()is invoked when the specified node or any of its descendants experiences a change in its children.- Parameters:
mailboxId- theIdof theMailboxnode to monitor- Throws:
NullArgumentException-mailboxIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-