Class NetworkReceiver
- java.lang.Object
-
- edu.wpi.grip.core.operations.network.NetworkReceiver
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public abstract class NetworkReceiver extends java.lang.Object implements java.lang.AutoCloseable
Manages the interface between thePublishAnnotatedOperation
and the actual network protocol implemented by a specificManager
.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
path
-
Constructor Summary
Constructors Constructor Description NetworkReceiver(java.lang.String path)
Create a new NetworkReceiver with the specified path.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract void
addListener(java.util.function.Consumer<java.lang.Object> consumer)
Add a listener to the NetworkReceiver item.abstract void
close()
Close the network receiver.abstract java.lang.Object
getValue()
Get the value of the object.
-
-
-
Method Detail
-
getValue
public abstract java.lang.Object getValue()
Get the value of the object.- Returns:
- The value of this NetworkReceiver
-
addListener
public abstract void addListener(java.util.function.Consumer<java.lang.Object> consumer)
Add a listener to the NetworkReceiver item.- Parameters:
consumer
- The consumer to call when this item has a update
-
close
public abstract void close()
Close the network receiver. This should not throw an exception.- Specified by:
close
in interfacejava.lang.AutoCloseable
-
-