Interface MailboxNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface MailboxNotificationSession extends 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 Details

    • canRegisterForMailboxNotifications

      boolean canRegisterForMailboxNotifications()
      Tests if this user can register for Mailbox 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 opt not to offer notification operations.
      Returns:
      false if notification methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • reliableMailboxNotifications

      void reliableMailboxNotifications()
      Reliable notifications are desired. In reliable mode, notifications are to be acknowledged using acknowledgeMailboxNotification() .
      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 - the Id of the notification
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewMailboxes

      void registerForNewMailboxes() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new mailboxes. MailboxReceiver.newMailboxes() is invoked when a new Mailbox is created.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedMailboxes

      void registerForChangedMailboxes() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated mailboxes. MailboxReceiver.changedMailboxes() is invoked when a mailbox is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 - the Id of the Mailbox to monitor
      Throws:
      NullArgumentException - mailboxId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedMailboxes

      void registerForDeletedMailboxes() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted mailboxes. MailboxReceiver.deletedMailboxes() is invoked when a mailbox is deleted.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 - the Id of the Mailbox to monitor
      Throws:
      NullArgumentException - mailboxId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedMailboxHierarchy

      void registerForChangedMailboxHierarchy() 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.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 - the Id of the Mailbox node to monitor
      Throws:
      NullArgumentException - mailboxId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 - the Id of the Mailbox node to monitor
      Throws:
      NullArgumentException - mailboxId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.