Interface DepotNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface DepotNotificationSession extends OsidSession

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

Like all OsidSessions, DepotNotificationSessions are dedicated to single processing threads and a single authenticated user.

  • Method Details

    • canRegisterForDepotNotifications

      boolean canRegisterForDepotNotifications()
      Tests if this user can register for Depot 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.
    • reliableDepotNotifications

      void reliableDepotNotifications()
      Reliable notifications are desired. In reliable mode, notifications are to be acknowledged using acknowledgeDepotNotification().
      Compliance:
      mandatory - This method must be implemented.
    • unreliableDepotNotifications

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

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

      void registerForNewDepots() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new depots. DepotReceiver.newDepots() is invoked when a new Depot is created.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedDepots

      void registerForChangedDepots() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated depots. DepotReceiver.changedDepots() is invoked when a depot is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedDepot

      void registerForChangedDepot(Id depotId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated depot. DepotReceiver.changedDepots() is invoked when the specified depot is changed.
      Parameters:
      depotId - the Id of the depot to monitor
      Throws:
      NullArgumentException - depotId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedDepots

      void registerForDeletedDepots() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted depots. DepotReceiver.deletedDepots() is invoked when a depot is deleted.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedDepot

      void registerForDeletedDepot(Id depotId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted depot. DepotReceiver.deletedDepots() is invoked when the specified depot is deleted.
      Parameters:
      depotId - the Id of the depot to monitor
      Throws:
      NullArgumentException - depotId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedDepotHierarchy

      void registerForChangedDepotHierarchy() throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated depot hierarchy structure. DepotReceiver.changedChildOfDepots() 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.
    • registerForChangedDepotHierarchyForAncestors

      void registerForChangedDepotHierarchyForAncestors(Id depotId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated depot hierarchy structure. DepotReceiver.changedChildOfDepots() is invoked when the specified node or any of its descendants experiences a change in its children.
      Parameters:
      depotId - the Id of the Depot node to monitor
      Throws:
      NullArgumentException - depotId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedDepotHierarchyForDescendants

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