public abstract class NetworkTableNode extends java.lang.Object implements AbstractNetworkTableEntryStore.TableListenerManager, ClientConnectionListenerManager, IRemote
#init(NetworkTableTransactionPool, AbstractNetworkTableEntryStore)
before calling any other methods on this classModifier and Type | Field and Description |
---|---|
protected AbstractNetworkTableEntryStore |
entryStore |
Constructor and Description |
---|
NetworkTableNode() |
Modifier and Type | Method and Description |
---|---|
void |
addConnectionListener(IRemoteConnectionListener listener,
boolean immediateNotify)
Register an object to listen for connection and disconnection events
|
void |
addTableListener(ITableListener listener,
boolean immediateNotify) |
abstract void |
close()
close all networking activity related to this node
|
boolean |
containsKey(java.lang.String key) |
void |
fireConnectedEvent()
called when something is connected
|
void |
fireDisconnectedEvent()
called when something is disconnected
|
void |
fireTableListeners(java.lang.String key,
java.lang.Object value,
boolean isNew)
Called when the object should fire it's listeners
|
boolean |
getBoolean(java.lang.String name) |
double |
getDouble(java.lang.String name) |
AbstractNetworkTableEntryStore |
getEntryStore() |
java.lang.String |
getString(java.lang.String name) |
java.lang.Object |
getValue(java.lang.String name) |
protected void |
init(AbstractNetworkTableEntryStore entryStore) |
void |
putBoolean(java.lang.String name,
boolean value) |
void |
putComplex(java.lang.String name,
ComplexData value) |
void |
putDouble(java.lang.String name,
double value) |
void |
putString(java.lang.String name,
java.lang.String value) |
void |
putValue(NetworkTableEntry entry,
java.lang.Object value) |
void |
putValue(java.lang.String name,
NetworkTableEntryType type,
java.lang.Object value)
Put a value with a specific network table type
|
void |
putValue(java.lang.String name,
java.lang.Object value) |
void |
removeConnectionListener(IRemoteConnectionListener listener)
Unregister a listener from connection events
|
void |
removeTableListener(ITableListener listener) |
void |
retrieveValue(java.lang.String name,
java.lang.Object externalData) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isConnected, isServer
protected AbstractNetworkTableEntryStore entryStore
public NetworkTableNode()
protected final void init(AbstractNetworkTableEntryStore entryStore)
public AbstractNetworkTableEntryStore getEntryStore()
public void putBoolean(java.lang.String name, boolean value)
public boolean getBoolean(java.lang.String name) throws TableKeyNotDefinedException
TableKeyNotDefinedException
public void putDouble(java.lang.String name, double value)
public double getDouble(java.lang.String name) throws TableKeyNotDefinedException
TableKeyNotDefinedException
public void putString(java.lang.String name, java.lang.String value)
public java.lang.String getString(java.lang.String name) throws TableKeyNotDefinedException
TableKeyNotDefinedException
public void putComplex(java.lang.String name, ComplexData value)
public void retrieveValue(java.lang.String name, java.lang.Object externalData) throws TableKeyNotDefinedException
TableKeyNotDefinedException
public void putValue(java.lang.String name, java.lang.Object value) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public void putValue(java.lang.String name, NetworkTableEntryType type, java.lang.Object value)
name
- the name of the entry to associate with the given valuetype
- the type of the entryvalue
- the actual value of the entrypublic void putValue(NetworkTableEntry entry, java.lang.Object value)
public java.lang.Object getValue(java.lang.String name) throws TableKeyNotDefinedException
TableKeyNotDefinedException
public boolean containsKey(java.lang.String key)
key
- the key to check for existencepublic abstract void close()
public void addConnectionListener(IRemoteConnectionListener listener, boolean immediateNotify)
IRemote
addConnectionListener
in interface IRemote
listener
- the listener to be registerimmediateNotify
- if the listener object should be notified of the current connection statepublic void removeConnectionListener(IRemoteConnectionListener listener)
IRemote
removeConnectionListener
in interface IRemote
listener
- the listener to be unregisteredpublic void fireConnectedEvent()
ClientConnectionListenerManager
fireConnectedEvent
in interface ClientConnectionListenerManager
public void fireDisconnectedEvent()
ClientConnectionListenerManager
fireDisconnectedEvent
in interface ClientConnectionListenerManager
public void addTableListener(ITableListener listener, boolean immediateNotify)
public void removeTableListener(ITableListener listener)
public void fireTableListeners(java.lang.String key, java.lang.Object value, boolean isNew)
AbstractNetworkTableEntryStore.TableListenerManager
fireTableListeners
in interface AbstractNetworkTableEntryStore.TableListenerManager