Interface IEHistoricSubscriber
-
- All Superinterfaces:
EObject
public interface IEHistoricSubscriber extends EObject
Classes wanting to receive historic notifications from anhistoric subscribe feedneed to implement this interface.An
EHistoricSubscribeFeedis a hybrid objects which sits between anIEHistoricSubscriberand historic feed publishers. This historic subscribe feed collects both historic (previously published) and newly published notifications and feeds them back to the historic subscriber ordered by time. This playback also includes changes in a publisher's feed status. Methodnotify(ENotificationMessage, EHistoricSubscribeFeed)is used to deliver both historic and live notifications to the historic subscriber.Method
feedStatus(PublishStatusEvent, EHistoricSubscribeFeed)reports a feed status for a particular historic publisher identified byENotificationMessage.publisherIdandPublishStatusEvent.feedStatethe publisher's feed state. UnlikeIESubscribeFeed, feed state is tracked per publisher and not for all publishers collectively.If an historic subscribe feed has a fixed ending time, then when the historic subscribe feed has reached that end time or if the historic feed fails to retrieve past notification messages, then the feed calls
feedDone(EHistoricSubscribeFeed.HistoricFeedState, EHistoricSubscribeFeed)to let the historic subscriber know that no more notifications or feed state changes will be delivered.Note: if the historic feed end time is marked as on-going
EHistoricSubscribeFeed.Builder.toForever(), thenhistoricFeedStatusis never called with a down feed state because the feed ends only when the historic subscribe feed is unsubscribed or closed.- Author:
- Charles W. Rapp
-
-
Field Summary
-
Fields inherited from interface net.sf.eBus.client.EObject
NAME_NOT_SET
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default voidfeedDone(EHistoricSubscribeFeed.HistoricFeedState feedState, EHistoricSubscribeFeed feed)Reports historic subscribe feed is completed and no more events will be posted from the feed.default voidfeedStatus(PublishStatusEvent event, EHistoricSubscribeFeed feed)Reports a publisher feed state change for the underlying notification message feed.default voidnotify(ENotificationMessage msg, EHistoricSubscribeFeed feed)Reports latest notification message.
-
-
-
Method Detail
-
feedDone
default void feedDone(EHistoricSubscribeFeed.HistoricFeedState feedState, EHistoricSubscribeFeed feed)
Reports historic subscribe feed is completed and no more events will be posted from the feed. Feed state will be eitherDONE_SUCCESSorDONE_ERROR. If feed experienced an error, the exception associated with the error can be retrieve by callingEHistoricSubscribeFeed.errorCause().This method is not called if historic subscribe feed end time is set to
EHistoricSubscribeFeed.TimeLocation.ON_GOING.- Parameters:
feedState- historic subscribe feed status. Will be eitherEHistoricSubscribeFeed.HistoricFeedState.DONE_SUCCESSorEHistoricSubscribeFeed.HistoricFeedState.DONE_ERROR.feed- historic subscribe feed.
-
feedStatus
default void feedStatus(PublishStatusEvent event, EHistoricSubscribeFeed feed)
Reports a publisher feed state change for the underlying notification message feed.- Parameters:
event- contains latest publisher feed state for a given message key.feed- historic subscribe feed.
-
notify
default void notify(ENotificationMessage msg, EHistoricSubscribeFeed feed)
Reports latest notification message.- Parameters:
msg- latest notification message.feed- historic subscribe feed.
-
-