Package net.sf.eBus.feed.historic
Interface IEHistoricPublisher
-
- All Superinterfaces:
EObject
public interface IEHistoricPublisher extends EObject
Classes wanting to send eBus notifications using anEHistoricPublishFeedneed to implement this interface. Note that unlikeEPublishFeed, an historic publisher is always free to publish notification messages as long as 1) the historic publish feed is open, 2) the feed is advertised, and 3) the publish feed state isup.An historic publisher is required to provide a unique identifier. This identifier is used order past notifications set to an historic subscriber. It also allows historic subscribers to differentiate between publisher notification streams.
PublishStatusEventcontains this publisher identifier so historic subscriber can determine which publisher's stream is now up or down.See
EHistoricPublishFeedfor detailed explanation on how to create and use an historic publish feed.- Author:
- Charles W. Rapp
- See Also:
EHistoricPublishFeed
-
-
Field Summary
-
Fields inherited from interface net.sf.eBus.client.EObject
NAME_NOT_SET
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description longpublisherId()Returns historic publisher unique identifier.default voidpublishStatus(EFeedState feedState, EHistoricPublishFeed feed)eBus is informing the historic publisher that there is at least one active subscriber to the publisher's notification feed.
-
-
-
Method Detail
-
publisherId
long publisherId()
Returns historic publisher unique identifier. Note that this uniqueness is not enforced by eBus. Users are encouraged to ensure uniqueness so that publishers may be matched to notification messages.- Returns:
- historic publisher identifier.
-
publishStatus
default void publishStatus(EFeedState feedState, EHistoricPublishFeed feed)
eBus is informing the historic publisher that there is at least one active subscriber to the publisher's notification feed. This callback is provided as a courtesy only since historic publishers are always free to publish notification messages on an historic publish feed (as long asEHistoricPublishFeed.isFeedUp()returnstrue).By default this method does nothing.
- Parameters:
feedState-EFeedState.UPif there is at least one subscriber to this notification feed; otherwise set toEFeedState.DOWN.feed- historic publish feed reporting this feed state change.
-
-