Class MapNetworkPublisher<T>

  • Type Parameters:
    T - The type of the 'value' in the string, value map that is being published
    All Implemented Interfaces:
    java.lang.AutoCloseable

    public abstract class MapNetworkPublisher<T>
    extends NetworkPublisher<java.util.Map<java.lang.String,​T>>
    Publishes a map of keys to values.
    • Constructor Detail

      • MapNetworkPublisher

        protected MapNetworkPublisher​(java.util.Set<java.lang.String> keys)
    • Method Detail

      • publish

        public final void publish​(java.util.Map<java.lang.String,​T> publishMap)
        Publishes the given key/value pair to the network publisher. The key must be in the set of keys provided to the constructor.
        Specified by:
        publish in class NetworkPublisher<java.util.Map<java.lang.String,​T>>
        Parameters:
        publishMap - the keyValues to publish
      • doPublish

        protected abstract void doPublish()
        Publishes nothing.
      • doPublish

        protected abstract void doPublish​(java.util.Map<java.lang.String,​T> publishMap)
        Publishes a key value mapping.
        Parameters:
        publishMap - The mapping of keys to values to be published
      • doPublishSingle

        protected abstract void doPublishSingle​(T value)
        Publish a single value using the NetworkPublisher.name as the key.
        Parameters:
        value - The value to be published