Package com.jme3.network.base
Class ConnectorAdapter
java.lang.Object
java.lang.Thread
com.jme3.network.base.ConnectorAdapter
- All Implemented Interfaces:
Runnable
Wraps a single Connector and forwards new messages
to the supplied message dispatcher. This is used
by DefaultClient to manage its connector objects.
This is only responsible for message reading and provides
no support for buffering writes.
This adapter assumes a simple protocol where two bytes define a (short) object size with the object data to follow. Note: this limits the size of serialized objects to 32676 bytes... even though, for example, datagram packets can hold twice that. :P
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
-
Field Summary
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
Constructor Summary
ConstructorDescriptionConnectorAdapter
(Connector connector, MessageProtocol protocol, MessageListener<Object> dispatcher, ErrorListener<Object> errorHandler, boolean reliable) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected void
protected void
void
run()
void
write
(ByteBuffer data) Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
Constructor Details
-
ConnectorAdapter
public ConnectorAdapter(Connector connector, MessageProtocol protocol, MessageListener<Object> dispatcher, ErrorListener<Object> errorHandler, boolean reliable)
-
-
Method Details