Package adams.core

Class PublishSubscribeHandler

    • Constructor Detail

      • PublishSubscribeHandler

        public PublishSubscribeHandler()
        Initializes the handler.
    • Method Detail

      • initialize

        protected void initialize()
        Initializes the members.
      • addSubscriber

        public void addSubscriber​(PublicationListener s)
        Adds the subscriber.
        Parameters:
        s - the subscriber to add
      • removeSubscriber

        public void removeSubscriber​(PublicationListener s)
        Removes the subscriber.
        Parameters:
        s - the subscriber to remove
      • clear

        public void clear()
        Removes all subscribers.
      • publish

        public void publish​(Object source,
                            Object data)
        Publishes the data.
        Parameters:
        source - the source that generated the data
        data - the data to publish