|
" 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.server.ServerConnectionAdapter
public class ServerConnectionAdapter
Object that adapts messages from a client to the server
Field Summary | |
---|---|
NetworkTableConnection |
connection
the connection this adapter uses |
Fields inherited from interface edu.wpi.first.wpilibj.networktables2.IncomingEntryReceiver |
---|
NULL |
Constructor Summary | |
---|---|
ServerConnectionAdapter(IOStream stream,
ServerNetworkTableEntryStore entryStore,
IncomingEntryReceiver transactionReceiver,
ServerAdapterManager adapterListener,
NetworkTableEntryTypeManager typeManager,
NTThreadManager threadManager)
Create a server connection adapter for a given stream |
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 |
ensureAlive()
|
void |
flush()
|
ServerConnectionState |
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 |
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 |
serverHelloComplete()
|
void |
shutdown(boolean closeStream)
stop the read thread and close the stream |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final NetworkTableConnection connection
Constructor Detail |
---|
public ServerConnectionAdapter(IOStream stream, ServerNetworkTableEntryStore entryStore, IncomingEntryReceiver transactionReceiver, ServerAdapterManager adapterListener, NetworkTableEntryTypeManager typeManager, NTThreadManager threadManager)
stream
- transactionPool
- entryStore
- transactionReceiver
- adapterListener
- threadManager
- Method Detail |
---|
public void badMessage(BadMessageException e)
ConnectionAdapter
badMessage
in interface ConnectionAdapter
public void ioException(IOException e)
ConnectionAdapter
ioException
in interface ConnectionAdapter
public void shutdown(boolean closeStream)
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) throws IOException
ConnectionAdapter
protocolVersionUnsupported
in interface ConnectionAdapter
protocolRevision
- the protocol version the server reported it supports
IOException
public 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 NetworkTableEntry getEntry(char id)
ConnectionAdapter
getEntry
in interface ConnectionAdapter
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 ServerConnectionState getConnectionState()
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 |