|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.elkoserver.foundation.net.ConnectionBase
public abstract class ConnectionBase
Base class providing common internals implementation for various types of Connection objects.
| Field Summary | |
|---|---|
protected static Object |
theCloseMarker
Token to put on send queue to signal close of connection. |
| Constructor Summary | |
|---|---|
protected |
ConnectionBase(NetworkManager mgr)
Constructor. |
| Method Summary | |
|---|---|
protected void |
connectionDied(Throwable reason)
Cope with loss of a connection. |
protected void |
enqueueHandlerFactory(MessageHandlerFactory handlerFactory)
Enqueue a task to invoke a message handler factory to produce a message handler for this connection. |
protected void |
enqueueReceivedMessage(Object message)
Enqueue a received message for processing. |
int |
id()
Identify this connection for logging purposes. |
void |
setDebugMode(boolean mode)
Turn on or off debug features on this connection. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.elkoserver.foundation.net.Connection |
|---|
close, sendMsg |
| Field Detail |
|---|
protected static final Object theCloseMarker
| Constructor Detail |
|---|
protected ConnectionBase(NetworkManager mgr)
mgr - Network manager for this server.| Method Detail |
|---|
protected void connectionDied(Throwable reason)
reason - Throwable describing why the connection died.public int id()
id in interface Connectionprotected void enqueueReceivedMessage(Object message)
message - The received message.protected void enqueueHandlerFactory(MessageHandlerFactory handlerFactory)
handlerFactory - Provider of a message handler to process messages
received on this connection.public void setDebugMode(boolean mode)
setDebugMode in interface Connectionmode - If true, turn debug mode on; if false, turn it off.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||