Class MapNetworkPublisher<T>
- java.lang.Object
-
- edu.wpi.grip.core.operations.network.NetworkPublisher<java.util.Map<java.lang.String,T>>
-
- edu.wpi.grip.core.operations.network.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 Summary
Constructors Modifier Constructor Description protectedMapNetworkPublisher(java.util.Set<java.lang.String> keys)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voiddoPublish()Publishes nothing.protected abstract voiddoPublish(java.util.Map<java.lang.String,T> publishMap)Publishes a key value mapping.protected abstract voiddoPublishSingle(T value)Publish a single value using theNetworkPublisher.nameas the key.voidpublish(java.util.Map<java.lang.String,T> publishMap)Publishes the given key/value pair to the network publisher.-
Methods inherited from class edu.wpi.grip.core.operations.network.NetworkPublisher
checkNamePresent, close, publishNameChanged, setName
-
-
-
-
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:
publishin classNetworkPublisher<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 theNetworkPublisher.nameas the key.- Parameters:
value- The value to be published
-
-