Class EthosChangeNotificationPollService
- java.lang.Object
-
- com.ellucian.ethos.integration.notification.AbstractEthosNotificationPollService
-
- com.ellucian.ethos.integration.notification.EthosChangeNotificationPollService
-
- All Implemented Interfaces:
Flow.Publisher<ChangeNotification>
public class EthosChangeNotificationPollService extends AbstractEthosNotificationPollService implements Flow.Publisher<ChangeNotification>
Service for distributing Ethos ChangeNotifications retrieved from Ethos Integration. Implements theFlow.Publisher
interface, but this does NOT publish messages to Ethos Integration. Serves as a "publisher" to push notification messages out to client application code from Ethos Integration through the SDK. An instance of this class should be used to subscribe client application ChangeNotification subscribers (extendingAbstractEthosChangeNotificationSubscriber
).- Since:
- 0.2.0
- Author:
- David Kumar
-
-
Field Summary
Fields Modifier and Type Field Description protected EthosChangeNotificationService
ethosChangeNotificationService
Used by the EthosChangeNotificationSubscription built by this class.-
Fields inherited from class com.ellucian.ethos.integration.notification.AbstractEthosNotificationPollService
DEFAULT_POLL_INTERVAL_SECONDS, pollingIntervalSeconds, subscriberMap
-
-
Constructor Summary
Constructors Constructor Description EthosChangeNotificationPollService(EthosChangeNotificationService ethosChangeNotificationService)
Constructs an instance of this class with the given ethosChangeNotificationService.EthosChangeNotificationPollService(EthosChangeNotificationService ethosChangeNotificationService, long pollingIntervalSeconds)
Constructs an instance of this class with the given params.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
subscribe(Flow.Subscriber<? super ChangeNotification> subscriber)
Subscribes the given subscriber to anEthosChangeNotificationSubscription
, initiating the process for the subscriber to receive ChangeNotifications.-
Methods inherited from class com.ellucian.ethos.integration.notification.AbstractEthosNotificationPollService
getNumberOfSubscribers, getSubscribers, unsubscribe
-
-
-
-
Field Detail
-
ethosChangeNotificationService
protected EthosChangeNotificationService ethosChangeNotificationService
Used by the EthosChangeNotificationSubscription built by this class.
-
-
Constructor Detail
-
EthosChangeNotificationPollService
public EthosChangeNotificationPollService(EthosChangeNotificationService ethosChangeNotificationService)
Constructs an instance of this class with the given ethosChangeNotificationService. Uses the default polling interval for time between poll attempts:AbstractEthosNotificationPollService.DEFAULT_POLL_INTERVAL_SECONDS
.- Parameters:
ethosChangeNotificationService
- The ChangeNotification service to use for retrieving notification messages.- Throws:
IllegalArgumentException
- Thrown if the ethosChangeNotificationService is null.
-
EthosChangeNotificationPollService
public EthosChangeNotificationPollService(EthosChangeNotificationService ethosChangeNotificationService, long pollingIntervalSeconds)
Constructs an instance of this class with the given params.- Parameters:
ethosChangeNotificationService
- The ChangeNotification service to use for retrieving notification messages.pollingIntervalSeconds
- The polling interval between poll attempts to retrieve notification messages, in seconds.- Throws:
IllegalArgumentException
- Thrown if the ethosChangeNotificationService is null.
-
-
Method Detail
-
subscribe
public void subscribe(Flow.Subscriber<? super ChangeNotification> subscriber)
Subscribes the given subscriber to anEthosChangeNotificationSubscription
, initiating the process for the subscriber to receive ChangeNotifications.- Specified by:
subscribe
in interfaceFlow.Publisher<ChangeNotification>
- Parameters:
subscriber
- An instance of a client application implementation ofAbstractEthosChangeNotificationSubscriber
.
-
-