Interface PressNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface PressNotificationSession extends OsidSession

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

    • canRegisterForPressNotifications

      boolean canRegisterForPressNotifications()
      Tests if this user can register for Press 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 press 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.
    • reliablePressNotifications

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

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

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

      void registerForNewPresses() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new presses. PressReceiver.newPress() is invoked when a new Press is created.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedPresses

      void registerForChangedPresses() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated presses. PressReceiver.changedPress() is invoked when an press is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedPress

      void registerForChangedPress(Id pressId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated press. PressReceiver.changedPress() is invoked when the specified press is changed.
      Parameters:
      pressId - the Id of the Press to monitor
      Throws:
      NullArgumentException - pressId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedPresses

      void registerForDeletedPresses() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted presses. PressReceiver.deletedPress() is invoked when an press is deleted.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedPress

      void registerForDeletedPress(Id pressId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted press. PressReceiver.deletedPress() is invoked when the specified press is deleted.
      Parameters:
      pressId - the Id of the Press to monitor
      Throws:
      NullArgumentException - pressId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedPressHierarchy

      void registerForChangedPressHierarchy() throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated press hierarchy structure. PressReceiver.changedChildOfPresses() 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.
    • registerForChangedPressHierarchyForAncestors

      void registerForChangedPressHierarchyForAncestors(Id pressId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated press hierarchy structure. PressReceiver.changedChildOfPresses() is invoked when the specified node or any of its descendants experiences a change in its children.
      Parameters:
      pressId - the Id of the Press node to monitor
      Throws:
      NullArgumentException - pressId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedPressHierarchyForDescendants

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