Interface DistributorNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface DistributorNotificationSession extends OsidSession

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

    • canRegisterForDistributorNotifications

      boolean canRegisterForDistributorNotifications()
      Tests if this user can register for Distributor 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.
    • reliableDistributorNotifications

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

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

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

      void registerForNewDistributors() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new distributors. DistributorReceiver.newDistributors() is invoked when a new Distributor is created.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedDistributors

      void registerForChangedDistributors() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated distributors. DistributorReceiver.changedDistributors() is invoked when a distributor is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedDistributor

      void registerForChangedDistributor(Id distributorId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated distributor. DistributorReceiver.changedDistributors() is invoked when the specified distributor is changed.
      Parameters:
      distributorId - the Id of the Distributor to monitor
      Throws:
      NullArgumentException - distributorId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedDistributors

      void registerForDeletedDistributors() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted distributors. DistributorReceiver.deletedDistributors() is invoked when a distributor is deleted.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedDistributor

      void registerForDeletedDistributor(Id distributorId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted distributor. DistributorReceiver.deletedDistributors() is invoked when the specified distributor is deleted.
      Parameters:
      distributorId - the Id of the Distributor to monitor
      Throws:
      NullArgumentException - distributorId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedDistributorHierarchy

      void registerForChangedDistributorHierarchy() throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated distributor hierarchy structure. DistributorReceiver.changedChildOfDistributors() 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.
    • registerForChangedDistributorHierarchyForAncestors

      void registerForChangedDistributorHierarchyForAncestors(Id distributorId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated distributor hierarchy structure. DistributorReceiver.changedChildOfDistributors() is invoked when the specified node or any of its descendants experiences a change in its children.
      Parameters:
      distributorId - the Id of the Distributor node to monitor
      Throws:
      NullArgumentException - distributorId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedDistributorHierarchyForDescendants

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