Class AbstractEthosNotificationPollService

    • Field Detail

      • DEFAULT_POLL_INTERVAL_SECONDS

        public static final long DEFAULT_POLL_INTERVAL_SECONDS
        The default poll interval in seconds. This is how long to wait between poll attempts by default if poll interval is not specified.
        See Also:
        Constant Field Values
      • subscriberMap

        protected Map<Flow.Subscriber,​Flow.Subscription> subscriberMap
        Maps the subscribers to their subscriptions, as there could be multiple instances of subscribers.
      • pollingIntervalSeconds

        protected long pollingIntervalSeconds
        The polling interval in seconds between poll attempts to retrieve notification messages from Ethos Integration.
    • Constructor Detail

      • AbstractEthosNotificationPollService

        public AbstractEthosNotificationPollService()
        No-arg constructor setting the pollingIntervalSeconds to DEFAULT_POLL_INTERVAL_SECONDS.
      • AbstractEthosNotificationPollService

        public AbstractEthosNotificationPollService​(long pollingIntervalSeconds)
        Constructs an instance of this class with the given params.
        Parameters:
        pollingIntervalSeconds - The polling interval between poll attempts to retrieve notification messages, in seconds.
        Throws:
        IllegalArgumentException - Thrown if the ethosChangeNotificationService is null.
    • Method Detail

      • unsubscribe

        public void unsubscribe​(Flow.Subscriber subscriber)
        Unsubscribes the given subscriber from this publisher, removing them from the subscriber map.
        Parameters:
        subscriber - The subscriber to unsubscribe.
        Throws:
        IllegalArgumentException - Thrown if the given subscriber is null.
      • getNumberOfSubscribers

        public int getNumberOfSubscribers()
        Gets the number of subscribers this publisher is responsible for.
        Returns:
        The number of subscribers this publisher has.
      • getSubscribers

        public List<Flow.Subscriber> getSubscribers()
        Gets a list of the subscribers this publisher has.
        Returns:
        A list of subscribers for this publisher.