Class EthosChangeNotificationSubscription
- java.lang.Object
-
- com.ellucian.ethos.integration.notification.AbstractEthosNotificationSubscription
-
- com.ellucian.ethos.integration.notification.AbstractEthosChangeNotificationSubscription
-
- com.ellucian.ethos.integration.notification.EthosChangeNotificationSubscription
-
- All Implemented Interfaces:
Flow.Subscription
public class EthosChangeNotificationSubscription extends AbstractEthosChangeNotificationSubscription
Subscription for ChangeNotification processing. This subscription runs in a separate thread as configured by the scheduledExecutorService.- Since:
- 0.2.0
- Author:
- David Kumar
-
-
Field Summary
-
Fields inherited from class com.ellucian.ethos.integration.notification.AbstractEthosChangeNotificationSubscription
ethosChangeNotificationService
-
Fields inherited from class com.ellucian.ethos.integration.notification.AbstractEthosNotificationSubscription
cancelSubscription, pollingInterval, pollingIntervalTimeUnit, publisher, scheduledExecutorService, scheduledFuture, subscriber
-
-
Constructor Summary
Constructors Constructor Description EthosChangeNotificationSubscription(Flow.Publisher publisher, Flow.Subscriber subscriber, EthosChangeNotificationService ethosChangeNotificationService, long pollingInterval, TimeUnit pollingIntervalTimeUnit)
Constructs this subscription with the given params.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
processChangeNotifications(List<ChangeNotification> cnList)
Intended to be used internally by the SDK.-
Methods inherited from class com.ellucian.ethos.integration.notification.AbstractEthosChangeNotificationSubscription
cancel, getChangeNotifications, processCancellation, processRequest, request
-
Methods inherited from class com.ellucian.ethos.integration.notification.AbstractEthosNotificationSubscription
isRunning
-
-
-
-
Constructor Detail
-
EthosChangeNotificationSubscription
public EthosChangeNotificationSubscription(Flow.Publisher publisher, Flow.Subscriber subscriber, EthosChangeNotificationService ethosChangeNotificationService, long pollingInterval, TimeUnit pollingIntervalTimeUnit)
Constructs this subscription with the given params.- Parameters:
publisher
- The publisher for this subscription.subscriber
- The subscriber subscribing to this subscription. Should be a client application subscriber that extends AbstractEthosChangeNotificationSubscriber.ethosChangeNotificationService
- Service for retrieving ChangeNotifications.pollingInterval
- The polling time interval between polling attempts.pollingIntervalTimeUnit
- The time unit for the polling interval.- Throws:
IllegalArgumentException
- Thrown if the given ethosChangeNotificationService is null.
-
-
Method Detail
-
processChangeNotifications
protected void processChangeNotifications(List<ChangeNotification> cnList)
Intended to be used internally by the SDK.Iterates over the given ChangeNotification list and calls subscriber.onNext() for each notification. If an exception is thrown, will also call subscriber.onError() passing the given Throwable.
- Specified by:
processChangeNotifications
in classAbstractEthosChangeNotificationSubscription
- Parameters:
cnList
- The list of ChangeNotifications to propagate.
-
-