public class ConnectorAdapter
extends java.lang.Thread
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
Modifier and Type | Class and Description |
---|---|
protected class |
ConnectorAdapter.WriterThread |
Constructor and Description |
---|
ConnectorAdapter(Connector connector,
MessageProtocol protocol,
MessageListener<java.lang.Object> dispatcher,
ErrorListener<java.lang.Object> errorHandler,
boolean reliable) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected void |
dispatch(Message m) |
protected void |
handleError(java.lang.Exception e) |
void |
run() |
void |
write(java.nio.ByteBuffer data) |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public ConnectorAdapter(Connector connector, MessageProtocol protocol, MessageListener<java.lang.Object> dispatcher, ErrorListener<java.lang.Object> errorHandler, boolean reliable)
public void close()
protected void dispatch(Message m)
public void write(java.nio.ByteBuffer data)
protected void handleError(java.lang.Exception e)
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread