Class EthosChangeNotificationListSubscription
- java.lang.Object
-
- com.ellucian.ethos.integration.notification.AbstractEthosNotificationSubscription
-
- com.ellucian.ethos.integration.notification.AbstractEthosChangeNotificationSubscription
-
- com.ellucian.ethos.integration.notification.EthosChangeNotificationListSubscription
-
- All Implemented Interfaces:
Flow.Subscription
public class EthosChangeNotificationListSubscription extends AbstractEthosChangeNotificationSubscription
Subscription for processing lists of ChangeNotifications. 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 EthosChangeNotificationListSubscription(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
-
EthosChangeNotificationListSubscription
public EthosChangeNotificationListSubscription(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.Calls subscriber.onNext() passing the entire list of ChangeNotifications to the subscriber as a whole. This is a synchronous call waiting until the subscriber processes the entire list. 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.
-
-