Interface BinNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface BinNotificationSession extends OsidSession

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

    • canRegisterForBinNotifications

      boolean canRegisterForBinNotifications()
      Tests if this user can register for Bin 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.
    • reliableBinNotifications

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

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

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

      void registerForNewBins() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new bins. BinReceiver.newBins() is invoked when a new Bin is created.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedBins

      void registerForChangedBins() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated bins. BinReceiver.changedBins() is invoked when a bin is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedBin

      void registerForChangedBin(Id binId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated bin. BinReceiver.changedBins() is invoked when the specified bin is changed.
      Parameters:
      binId - the Id of the Bin to monitor
      Throws:
      NullArgumentException - binId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedBins

      void registerForDeletedBins() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted bins. BinReceiver.deletedBins() is invoked when a bin is deleted.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedBin

      void registerForDeletedBin(Id binId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted bin. BinReceiver.deletedBins() is invoked when the specified bin is deleted.
      Parameters:
      binId - the Id of the Bin to monitor
      Throws:
      NullArgumentException - binId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedBinHierarchy

      void registerForChangedBinHierarchy() throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated bin hierarchy structure. BinReceiver.changedChildOfBins() 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.
    • registerForChangedBinHierarchyForAncestors

      void registerForChangedBinHierarchyForAncestors(Id binId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated bin hierarchy structure. BinReceiver.changedChildOfBins() is invoked when the specified node or any of its descendants experiences a change in its children.
      Parameters:
      binId - the Id of the Bin node to monitor
      Throws:
      NullArgumentException - binId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedBinHierarchyForDescendants

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