Class AbstractEthosChangeNotificationListSubscriber
- java.lang.Object
-
- com.ellucian.ethos.integration.notification.AbstractEthosNotificationSubscriber
-
- com.ellucian.ethos.integration.notification.AbstractEthosChangeNotificationListSubscriber
-
- All Implemented Interfaces:
Flow.Subscriber<List<ChangeNotification>>
public abstract class AbstractEthosChangeNotificationListSubscriber extends AbstractEthosNotificationSubscriber implements Flow.Subscriber<List<ChangeNotification>>
Abstract class which provides "hooks" into the Ethos SDK for ChangeNotification list subscribers. Client application code should extend this class and implement the abstract methods to handle entire lists of ChangeNotifications as desired.A client application code ChangeNotification list subscriber extending this class will become active in receiving lists of ChangeNotifications after being subscribed to an EthosChangeNotificationListPublisher via the
EthosChangeNotificationListPollService.subscribe(Flow.Subscriber)
method. A client subscriber will stop receiving ChangeNotification lists after calling theAbstractEthosNotificationSubscriber.cancelSubscription()
method.- Since:
- 0.2.0
- Author:
- David Kumar
-
-
Field Summary
-
Fields inherited from class com.ellucian.ethos.integration.notification.AbstractEthosNotificationSubscriber
DEFAULT_NUM_NOTIFICATIONS, numNotifications, subscription
-
-
Constructor Summary
Constructors Constructor Description AbstractEthosChangeNotificationListSubscriber()
Enables subclasses to construct this class without specifying the number of notifications to retrieve from Ethos Integration at a single time.AbstractEthosChangeNotificationListSubscriber(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).
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
onChangeNotificationList(List<ChangeNotification> changeNotificationList)
This is the hook which client application code should implement when subclassing this class for processing entire lists of ChangeNotifications.abstract void
onChangeNotificationListError(Throwable throwable)
This is the hook which client application code should implement when subclassing this class for handling errors that occurred during onChangeNotificationList().void
onComplete()
Intended to be used internally by the SDK.void
onError(Throwable throwable)
Intended to be used internally by the SDK.void
onNext(List<ChangeNotification> item)
Intended to be used internally by the SDK.void
onSubscribe(Flow.Subscription subscription)
Intended to be used internally by the SDK.-
Methods inherited from class com.ellucian.ethos.integration.notification.AbstractEthosNotificationSubscriber
cancelSubscription, doSubscribe, isSubscriptionRunning
-
-
-
-
Constructor Detail
-
AbstractEthosChangeNotificationListSubscriber
public AbstractEthosChangeNotificationListSubscriber()
Enables subclasses to construct this class without specifying the number of notifications to retrieve from Ethos Integration at a single time.
-
AbstractEthosChangeNotificationListSubscriber
public AbstractEthosChangeNotificationListSubscriber(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
-
onSubscribe
public void onSubscribe(Flow.Subscription subscription)
Intended to be used internally by the SDK.Initiates the subscription process for this subscriber.
- Specified by:
onSubscribe
in interfaceFlow.Subscriber<List<ChangeNotification>>
- Parameters:
subscription
- The subscription to process, or request notifications for.
-
onNext
public void onNext(List<ChangeNotification> item)
Intended to be used internally by the SDK.Called by the subscription used by this subscriber for each notification. Relays the given notification to the
onChangeNotificationList(List)
method.- Specified by:
onNext
in interfaceFlow.Subscriber<List<ChangeNotification>>
- Parameters:
item
- The list of ChangeNotifications to process.
-
onError
public void onError(Throwable throwable)
Intended to be used internally by the SDK.Called by the subscription to handle any exceptions thrown during the processing call to onNext(). Relays the throwable to the
onChangeNotificationListError(Throwable)
method.- Specified by:
onError
in interfaceFlow.Subscriber<List<ChangeNotification>>
- Parameters:
throwable
- The exception caught by the subscription.
-
onComplete
public void onComplete()
Intended to be used internally by the SDK.Called by the subscriber when a given polling operation is complete.
- Specified by:
onComplete
in interfaceFlow.Subscriber<List<ChangeNotification>>
-
onChangeNotificationList
public abstract void onChangeNotificationList(List<ChangeNotification> changeNotificationList)
This is the hook which client application code should implement when subclassing this class for processing entire lists of ChangeNotifications.- Parameters:
changeNotificationList
- The list of ChangeNotifications to process.
-
onChangeNotificationListError
public abstract void onChangeNotificationListError(Throwable throwable)
This is the hook which client application code should implement when subclassing this class for handling errors that occurred during onChangeNotificationList().- Parameters:
throwable
- The exception thrown during the call to onChangeNotification().
-
-