Interface ReplyNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ReplyNotificationSession extends OsidSession

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

  • Method Details

    • getForumId

      Id getForumId()
      Gets the Forum Id associated with this session.
      Returns:
      the Forum Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getForum

      Gets the Forum associated with this session.
      Returns:
      the forum
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canRegisterForReplyNotifications

      boolean canRegisterForReplyNotifications()
      Tests if this user can register for Reply 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.
    • useFederatedForumView

      void useFederatedForumView()
      Federates the view for methods in this session. A federated view will include notifications for replies in forums which are children of this forum in the forum hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedForumView

      void useIsolatedForumView()
      Isolates the view for methods in this session. An isolated view restricts notifications to this forum only.
      Compliance:
      mandatory - This method is must be implemented.
    • reliableReplyNotifications

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

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

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

      void registerForNewReplies() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new replies. ReplyReceiver.newReplies() is invoked when a new Reply is created.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewRepliesForPoster

      void registerForNewRepliesForPoster(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of new replies for the given poster resource Id . ReplyReceiver.newReplies() is invoked when a new Reply is created.
      Parameters:
      resourceId - the Id of the resource to monitor
      Throws:
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewRepliesForPost

      void registerForNewRepliesForPost(Id postId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of new replies for the given post Id . ReplyReceiver.newReplies() is invoked when a new Reply is created.
      Parameters:
      postId - the Id of the post to monitor
      Throws:
      NullArgumentException - postId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedReplies

      void registerForChangedReplies() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated replies. ReplyReceiver.changedReplies() is invoked when a reply is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedRepliesForPoster

      void registerForChangedRepliesForPoster(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of changed replies for the given poster resource Id . ReplyReceiver.changedReplies() is invoked when a Reply for the poster is changed.
      Parameters:
      resourceId - the Id of the resource to monitor
      Throws:
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedRepliesForPost

      void registerForChangedRepliesForPost(Id postId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of changed replies for the given post Id . ReplyReceiver.changedReplies() is invoked when a Reply for the post is changed.
      Parameters:
      postId - the Id of the post to monitor
      Throws:
      NullArgumentException - postId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedReply

      void registerForChangedReply(Id replyId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated reply. ReplyReceiver.changedReplies() is invoked when the specified reply is changed.
      Parameters:
      replyId - the Id of the Reply to monitor
      Throws:
      NullArgumentException - replyId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedReplies

      void registerForDeletedReplies() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted replies. ReplyReceiver.deletedReplies() is invoked when a reply is deleted.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedRepliesForPoster

      void registerForDeletedRepliesForPoster(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of deleted replies for the given poster resource Id . ReplyReceiver.deletedReplies() is invoked when a Reply for the poster is deleted.
      Parameters:
      resourceId - the Id of the resource to monitor
      Throws:
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedRepliesForPost

      void registerForDeletedRepliesForPost(Id postId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of deleted replies for the given post Id . ReplyReceiver.deletedReplies() is invoked when a Reply for the post is deleted.
      Parameters:
      postId - the Id of the post to monitor
      Throws:
      NullArgumentException - postId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedReply

      void registerForDeletedReply(Id replyId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted reply. ReplyReceiver.deletedReplies() is invoked when the specified reply is deleted.
      Parameters:
      replyId - the Id of the Reply to monitor
      Throws:
      NullArgumentException - replyId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.