|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--org.kaariboga.io.ReceiveMessageThread
Receives a message through a socket connection.
Field Summary | |
private KbMessageHandler |
messageHandler
Message handler, that should handle the received message. |
private java.util.Collection |
receivingThreads
Threads, that are currently receiving messages. |
private java.net.Socket |
socket
Socket on which to receive message |
Fields inherited from class java.lang.Thread |
contextClassLoader, daemon, eetop, group, inheritableThreadLocals, inheritedAccessControlContext, MAX_PRIORITY, MIN_PRIORITY, name, NORM_PRIORITY, priority, single_step, stillborn, stopThreadPermission, target, threadInitNumber, threadLocals, threadQ |
Constructor Summary | |
ReceiveMessageThread(java.net.Socket socket,
KbMessageHandler handler,
java.util.Collection receivingThreads)
Creates a new Thread to receive a message. |
Method Summary | |
void |
run()
Reads message.from a socket and dispatches it to the message handler. |
Methods inherited from class java.lang.Thread |
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private java.net.Socket socket
private java.util.Collection receivingThreads
private KbMessageHandler messageHandler
Constructor Detail |
public ReceiveMessageThread(java.net.Socket socket, KbMessageHandler handler, java.util.Collection receivingThreads)
socket
- Socket of the incoming connection.handler
- KbMessageHander to handle the received messagereceivingThreads
- List of currently active threads receiving messages.Method Detail |
public void run()
run
in class java.lang.Thread
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |