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.AutoCloseableManages the interface between thePublishAnnotatedOperationand the actual network protocol implemented by a specificManager.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Stringpath
-
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 voidaddListener(java.util.function.Consumer<java.lang.Object> consumer)Add a listener to the NetworkReceiver item.abstract voidclose()Close the network receiver.abstract java.lang.ObjectgetValue()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:
closein interfacejava.lang.AutoCloseable
-
-