Interface PollsNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface PollsNotificationSession extends OsidSession

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

    • canRegisterForPollsNotifications

      boolean canRegisterForPollsNotifications()
      Tests if this user can register for Polls 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.
    • reliablePollsNotifications

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

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

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

      void registerForNewPolls() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new polls. PollsReceiver.newPolls() is invoked when a new Polls is created.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedPolls

      void registerForChangedPolls() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated polls. PollsReceiver.changedPolls() is invoked when a polls is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedPolls

      void registerForChangedPolls(Id pollsId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated polls. PollsReceiver.changedPolls() is invoked when the specified polls is changed.
      Parameters:
      pollsId - the Id of the Polls to monitor
      Throws:
      NullArgumentException - pollsId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedPolls

      void registerForDeletedPolls() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted polls. PollsReceiver.deletedPolls() is invoked when a polls is deleted.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedPolls

      void registerForDeletedPolls(Id pollsId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted polls. PollsReceiver.deletedPolls() is invoked when the specified polls is deleted.
      Parameters:
      pollsId - the Id of the Polls to monitor
      Throws:
      NullArgumentException - pollsId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedPollsHierarchy

      void registerForChangedPollsHierarchy() throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated polls hierarchy structure. PollsReceiver.changedChildOfPolls() 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.
    • registerForChangedPollsHierarchyForAncestors

      void registerForChangedPollsHierarchyForAncestors(Id pollsId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated polls hierarchy structure. PollsReceiver.changedChildOfPolls() is invoked when a node experiences a change in its children.
      Parameters:
      pollsId - the Id of the Polls node to monitor
      Throws:
      NullArgumentException - pollsId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedPollsHierarchyForDescendants

      void registerForChangedPollsHierarchyForDescendants(Id pollsId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated polls hierarchy structure. PollsReceiver.changedChildOfPolls() is invoked when a node experiences a change in its children.
      Parameters:
      pollsId - the Id of the Polls node to monitor
      Throws:
      NullArgumentException - pollsId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.