Interface ForumNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ForumNotificationSession extends OsidSession

This session defines methods to receive notifications on adds/changes to Forums . 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.

Notifications are triggered with changes to the Forum object itself. Adding and removing replies result in notifications available from the notification session for replies.

  • Method Details

    • canRegisterForForumNotifications

      boolean canRegisterForForumNotifications()
      Tests if this user can register for Forum 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.
    • reliableForumNotifications

      void reliableForumNotifications()
      Reliable notifications are desired. In reliable mode, notifications are to be acknowledged using acknowledgeForumNotification() .
      Compliance:
      mandatory - This method is must be implemented.
    • unreliableForumNotifications

      void unreliableForumNotifications()
      Unreliable notifications are desired. In unreliable mode, notifications do not need to be acknowledged.
      Compliance:
      mandatory - This method is must be implemented.
    • acknowledgeForumNotification

      void acknowledgeForumNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
      Acknowledge a forum notification.
      Parameters:
      notificationId - the Id of the notification
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewForums

      void registerForNewForums() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new forums. ForumReceiver.newForums() is invoked when a new Forum is created.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedForums

      void registerForChangedForums() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated forums. ForumReceiver.changedForums() is invoked when a forum is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedForum

      void registerForChangedForum(Id forumId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated forum. ForumReceiver.changedForums() is invoked when the specified forum is changed.
      Parameters:
      forumId - the Id of the Forum to monitor
      Throws:
      NullArgumentException - forumId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedForums

      void registerForDeletedForums() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted forums. ForumReceiver.deletedForums() is invoked when a forum is deleted.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedForum

      void registerForDeletedForum(Id forumId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted forum. ForumReceiver.deletedForums() is invoked when the specified forum is deleted.
      Parameters:
      forumId - the Id of the Forum to monitor
      Throws:
      NullArgumentException - forumId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedForumHierarchy

      void registerForChangedForumHierarchy() throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated forum hierarchy structure. FroumReceiver.changedChildOfForums() is invoked when a node experiences a change in its children.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedForumHierarchyForAncestors

      void registerForChangedForumHierarchyForAncestors(Id forumId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated forum hierarchy structure. ForumReceiver.changedChildOfForums() is invoked when the specified node or any of its ancestors experiences a change in its children.
      Parameters:
      forumId - the Id of the Forum node to monitor
      Throws:
      NullArgumentException - forumId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedForumHierarchyForDescendants

      void registerForChangedForumHierarchyForDescendants(Id forumId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated forum hierarchy structure. ForumReceiver.changedChildOfForums() is invoked when the specified node or any of its descendants experiences a change in its children.
      Parameters:
      forumId - the Id of the Forum node to monitor
      Throws:
      NullArgumentException - forumId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.