Class EAbstractHistoricFeed<T extends EObject>

  • Type Parameters:
    T - historic feed owner type.
    Direct Known Subclasses:
    EHistoricPublishFeed, EHistoricSubscribeFeed

    public abstract class EAbstractHistoricFeed<T extends EObject>
    extends Object
    Base class for EHistoricPublishFeed and EHistoricSubscribeFeed containing the data members common to each. This includes:
    • feed name (used for logging purposes),
    • EObject containing (or owning) this feed hybrid object,
    • notification and historic request message keys, and
    • feed scope (applies to notification, request, and reply feeds).

    This class also contains data members which track whether the feed is open, in place (that is, advertised or subscribed), and the current historic feed state.

    Author:
    Charles W. Rapp
    • Field Detail

      • mName

        protected final String mName
        eBus object name.
      • mOwner

        protected final T extends EObject mOwner
        This historic feed works on behalf of this eBus object.
      • mKey

        protected final EMessageKey mKey
        Notifications published on this message key.
      • mRequestKey

        protected final EMessageKey mRequestKey
        Historic message request feed key.
      • mScope

        protected final EFeed.FeedScope mScope
        Notification and request feed scope.
      • mIsOpen

        protected boolean mIsOpen
        Set to true when this feed is open and started and false when stopped.
      • mInPlace

        protected boolean mInPlace
        Set to true when historic feed is up.
      • mFeedState

        protected EFeedState mFeedState
        Current historic feed state.
    • Constructor Detail

      • EAbstractHistoricFeed

        protected EAbstractHistoricFeed​(EAbstractHistoricFeed.Builder<T,​?,​?> builder)
        Creates a new historic feed instance based on builder settings.
        Parameters:
        builder - contains historic feed settings.
    • Method Detail

      • doClose

        protected abstract void doClose()
        Performs actual work to close historic feed.
      • isOpen

        public final boolean isOpen()
        Returns true if this feed is open and false if closed. Once an historic feed is closed, it cannot be opened again.
        Returns:
        true if feed is open.
        See Also:
        inPlace()
      • inPlace

        public final boolean inPlace()
        Returns true if this feed is "in place" (that is, subscribed or advertised) and false if not.
        Returns:
        true if feed is in place.
      • key

        public final EMessageKey key()
        Returns notification message key.
        Returns:
        notification message key.
      • requestKey

        public final EMessageKey requestKey()
        Returns historic request message key.
        Returns:
        historic request message key.
      • scope

        public final EFeed.FeedScope scope()
        Returns historic notification and request feed scope.
        Returns:
        feed scope.
      • feedState

        public final EFeedState feedState()
        Returns current historic subscribe feed state.
        Returns:
        current feed state.
      • close

        public final void close()
        Permanently closes historic feed. This historic feed cannot be re-opened or used to publish/retrieve historic notifications after this.
      • closeFeed

        protected final void closeFeed​(EFeed feed)
        Closes feed if not null.
        Parameters:
        feed - close this feed.