|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--iglu.net.ClientHandler
The base class of the threads which the PortServer creates and starts to deal with client connections. It is sets up the communication socket with the client, and provides streams for talking with the client. It also closes them when it is done. However, it provide no further functionality.
Field Summary | |
protected java.net.Socket |
clientSocket
does the talking through the socket |
protected java.io.InputStream |
in
used for reading from the port |
protected PortServer |
myServer
This clienthandler's server. |
protected java.io.OutputStream |
out
used for writing to the port |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
ClientHandler()
|
|
ClientHandler(java.net.Socket client,
PortServer ms)
Constructor for the ClientHandler. |
Method Summary | |
void |
doneWithNetworkAccess()
Called before the class exits. |
void |
init(java.net.Socket client,
PortServer ms)
|
protected void |
internalDoneWithNetworkAccess()
called before the public doneWithNetworkAccess. |
void |
processClient()
Override this procedure to actually do the network access. |
void |
run()
Calls processClient, doneWithNetworkAccess, then closes the streams and Socket. |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.net.Socket clientSocket
protected java.io.OutputStream out
protected java.io.InputStream in
protected PortServer myServer
Constructor Detail |
public ClientHandler(java.net.Socket client, PortServer ms) throws java.io.IOException
public ClientHandler()
Method Detail |
public void init(java.net.Socket client, PortServer ms) throws java.io.IOException
java.io.IOException
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void processClient()
protected void internalDoneWithNetworkAccess()
public void doneWithNetworkAccess()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |