|
" 2013 FRC Java API " |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.wpi.first.wpilibj.networktables2.client.ClientConnectionAdapter
public class ClientConnectionAdapter
Object that adapts messages from a server
Field Summary |
---|
Fields inherited from interface edu.wpi.first.wpilibj.networktables2.IncomingEntryReceiver |
---|
NULL |
Constructor Summary | |
---|---|
ClientConnectionAdapter(ClientNetworkTableEntryStore entryStore,
NTThreadManager threadManager,
IOStreamFactory streamFactory,
ClientConnectionListenerManager connectionListenerManager,
NetworkTableEntryTypeManager typeManager)
Create a new ClientConnectionAdapter |
Method Summary | |
---|---|
void |
badMessage(BadMessageException e)
called if a bad message exception is thrown |
void |
clientHello(char protocolRevision)
Called when the connection receives a client hello message |
void |
close()
Close the client connection |
void |
close(ClientConnectionState newState)
Close the connection to the server and enter the given state |
void |
ensureAlive()
|
void |
flush()
|
ClientConnectionState |
getConnectionState()
|
NetworkTableEntry |
getEntry(char id)
get an entry (used by a connection when filling an update entry |
void |
ioException(IOException e)
called if an io exception is thrown |
boolean |
isConnected()
|
void |
keepAlive()
Called when the connection receives a keep alive message |
void |
offerIncomingAssignment(NetworkTableEntry entry)
|
void |
offerIncomingUpdate(NetworkTableEntry entry,
char sequenceNumber,
Object value)
|
void |
offerOutgoingAssignment(NetworkTableEntry entry)
|
void |
offerOutgoingUpdate(NetworkTableEntry entry)
|
void |
protocolVersionUnsupported(char protocolRevision)
Called when the connection receives a protocol unsupported message |
void |
reconnect()
Reconnect the client to the server (even if the client is not currently connected) |
void |
serverHelloComplete()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClientConnectionAdapter(ClientNetworkTableEntryStore entryStore, NTThreadManager threadManager, IOStreamFactory streamFactory, ClientConnectionListenerManager connectionListenerManager, NetworkTableEntryTypeManager typeManager)
entryStore
- threadManager
- streamFactory
- transactionPool
- connectionListenerManager
- Method Detail |
---|
public ClientConnectionState getConnectionState()
public boolean isConnected()
public void reconnect()
public void close()
public void close(ClientConnectionState newState)
newState
- public void badMessage(BadMessageException e)
ConnectionAdapter
badMessage
in interface ConnectionAdapter
public void ioException(IOException e)
ConnectionAdapter
ioException
in interface ConnectionAdapter
public NetworkTableEntry getEntry(char id)
ConnectionAdapter
getEntry
in interface ConnectionAdapter
public void keepAlive() throws IOException
ConnectionAdapter
keepAlive
in interface ConnectionAdapter
IOException
public void clientHello(char protocolRevision) throws IOException
ConnectionAdapter
clientHello
in interface ConnectionAdapter
IOException
public void protocolVersionUnsupported(char protocolRevision)
ConnectionAdapter
protocolVersionUnsupported
in interface ConnectionAdapter
protocolRevision
- the protocol version the server reported it supportspublic void serverHelloComplete() throws IOException
serverHelloComplete
in interface ConnectionAdapter
IOException
public void offerIncomingAssignment(NetworkTableEntry entry)
offerIncomingAssignment
in interface IncomingEntryReceiver
public void offerIncomingUpdate(NetworkTableEntry entry, char sequenceNumber, Object value)
offerIncomingUpdate
in interface IncomingEntryReceiver
public void offerOutgoingAssignment(NetworkTableEntry entry)
offerOutgoingAssignment
in interface OutgoingEntryReceiver
public void offerOutgoingUpdate(NetworkTableEntry entry)
offerOutgoingUpdate
in interface OutgoingEntryReceiver
public void flush()
flush
in interface FlushableOutgoingEntryReceiver
public void ensureAlive()
ensureAlive
in interface FlushableOutgoingEntryReceiver
|
" 2013 FRC Java API " |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |