Class AbstractEthosNotificationSubscriber

    • Field Detail

      • DEFAULT_NUM_NOTIFICATIONS

        public static final int DEFAULT_NUM_NOTIFICATIONS
        Constant for indicating the default number of notifications to be retrieved at a time from Ethos Integration. The value of this constant is not the default number of notifications that Ethos Integration uses.
        See Also:
        Constant Field Values
      • numNotifications

        protected Integer numNotifications
        The number of notifications to request at a time from Ethos Integration. Must be between 1 and 1000.
      • subscription

        protected Flow.Subscription subscription
        The subscription used by this subscriber.
    • Constructor Detail

      • AbstractEthosNotificationSubscriber

        public AbstractEthosNotificationSubscriber()
        Enables subclasses to construct this class without specifying the number of notifications to retrieve from Ethos Integration at a single time.
      • AbstractEthosNotificationSubscriber

        public AbstractEthosNotificationSubscriber​(Integer numNotifications)
        Enables subclasses to construct this class with the specified number of notifications to retrieve from Ethos Integration at a single time (per polling request).
        Parameters:
        numNotifications - The number of notifications to retrieve from Ethos Integration per polling request.
    • Method Detail

      • doSubscribe

        public void doSubscribe​(Flow.Subscription subscription)
        Intended to be used internally by the SDK.

        Initiates the subscription process for this subscriber.

        Parameters:
        subscription - The subscription to process, or request notifications for.
      • cancelSubscription

        public void cancelSubscription()
        Cancels the subscription used by this subscriber. This will request for the thread running the subscription to stop after the current polling operation is completed, after which no further notifications should be received for this subscriber.
      • isSubscriptionRunning

        public boolean isSubscriptionRunning()
        Indicates whether the subscription for this subscriber is running, or not.
        Returns:
        true if the subscription is running, false if not (if it were canceled).