Interface SubscriptionNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface SubscriptionNotificationSession extends OsidSession

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

    • getPublisherId

      Id getPublisherId()
      Gets the Publisher Id associated with this session.
      Returns:
      the Publisher Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getPublisher

      Gets the Publisher associated with this session.
      Returns:
      the publisher
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canRegisterForSubscriptionNotifications

      boolean canRegisterForSubscriptionNotifications()
      Tests if this user can register for Subscription 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.
    • useFederatedPublisherView

      void useFederatedPublisherView()
      Federates the view for methods in this session. A federated view will include entries in publishers which are children of this publisher in the publisher hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedPublisherView

      void useIsolatedPublisherView()
      Isolates the view for methods in this session. An isolated view restricts retrievals to this publisher only.
      Compliance:
      mandatory - This method is must be implemented.
    • reliableSubscriptionNotifications

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

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

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

      void registerForNewSubscriptions() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new subscriptions. SubscriptionReceiver.newSubscriptions() is invoked when a new Subscription is created.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewSubscriptionsByGenusType

      void registerForNewSubscriptionsByGenusType(Type subscriptionGenusType) throws OperationFailedException, PermissionDeniedException
      Register for notifications of new subscriptions of the given genus type. SubscriptionReceiver.newSubscriptions() is invoked when a new Subscription is created.
      Parameters:
      subscriptionGenusType - a subscription genus type
      Throws:
      NullArgumentException - subscriptionGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewSubscriptionsForSubscriber

      void registerForNewSubscriptionsForSubscriber(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of new subscriptions for the given resource Id . SubscriptionReceiver.newSubscriptions() is invoked when a new Subscription is created.
      Parameters:
      resourceId - the Id of the reference to monitor
      Throws:
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewSubscriptionsForDispatch

      void registerForNewSubscriptionsForDispatch(Id dispatchId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of new subscriptions for the given reference Id . SubscriptionReceiver.newSubscriptions() is invoked when a new Subscription is created.
      Parameters:
      dispatchId - the Id of the dispatch to monitor
      Throws:
      NullArgumentException - dispatchId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedSubscriptions

      void registerForChangedSubscriptions() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated subscriptions. SubscriptionReceiver.changedSubscriptions() is invoked when a subscription is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedSubscriptionsByGenusType

      void registerForChangedSubscriptionsByGenusType(Type subscriptionGenusType) throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated subscriptions of the given genus type. SubscriptionReceiver.changedSubscriptions() is invoked when a subscription is changed.
      Parameters:
      subscriptionGenusType - a subscription genus type
      Throws:
      NullArgumentException - subscriptionGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedSubscriptionsForSubscriber

      void registerForChangedSubscriptionsForSubscriber(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of changed subscriptions for the given resource Id . SubscriptionReceiver.changedSubscriptions() is invoked when a Subscription for the resource is changed.
      Parameters:
      resourceId - the Id of the resource to monitor
      Throws:
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedSubscriptionsForDispatch

      void registerForChangedSubscriptionsForDispatch(Id dispatchId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of changed subscriptions for the given dispatch Id . SubscriptionReceiver.changedSubscription() is invoked when a Subscription for the dispatch is changed.
      Parameters:
      dispatchId - the Id of the dispatch to monitor
      Throws:
      NullArgumentException - dispatchId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedSubscription

      void registerForChangedSubscription(Id subscriptionId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated subscription. SubscriptionReceiver.changedSubscriptions() is invoked when the specified subscription is changed.
      Parameters:
      subscriptionId - the Id of the Subscription to monitor
      Throws:
      NullArgumentException - subscriptionId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedSubscriptions

      void registerForDeletedSubscriptions() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted subscriptions. SubscriptionReceiver.deletedSubscriptions() is invoked when a subscription is deleted.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedSubscriptionsByGenusType

      void registerForDeletedSubscriptionsByGenusType(Type subscriptionGenusType) throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted subscriptions of the given genus type. SubscriptionReceiver.deletedSubscriptions() is invoked when a subscription is deleted.
      Parameters:
      subscriptionGenusType - a subscription genus type
      Throws:
      NullArgumentException - subscriptionGenusType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedSubscriptionsForSubscriber

      void registerForDeletedSubscriptionsForSubscriber(Id resourceId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of changed subscriptions for the given subscriber Id . SubscriptionReceiver.deletedSubscriptions() is invoked when a Subscription for the resource is deleted.
      Parameters:
      resourceId - the Id of the resource to monitor
      Throws:
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedSubscriptionsForDispatch

      void registerForDeletedSubscriptionsForDispatch(Id dispatchId) throws OperationFailedException, PermissionDeniedException
      Register for notifications of changed subscriptions for the given dispatch Id . SubscriptionReceiver.deletedSubscriptions() is invoked when a Subscription for the dispatch is deleted.
      Parameters:
      dispatchId - the Id of the dispatch to monitor
      Throws:
      NullArgumentException - dispatchId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedSubscription

      void registerForDeletedSubscription(Id subscriptionId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted subscription. SubscriptionReceiver.deletedSubscriptions() is invoked when the specified subscription is deleted.
      Parameters:
      subscriptionId - the Id of the Subscription to monitor
      Throws:
      NullArgumentException - subscriptionId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.