net.vattp.tunnel
Class HTTPConnectionHandler
java.lang.Object
|
+--java.lang.Thread
|
+--net.vattp.tunnel.HTTPConnectionHandler
- All Implemented Interfaces:
- Runnable
- public class HTTPConnectionHandler
- extends Thread
Untamed: Class to handle the suspension and shutdown messages.
- Author:
- Bill Frantz
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 |
CRLF
private static final char[] CRLF
lenHead
private static final String lenHead
myVats
private final Hashtable myVats
- map of logged on clients. Key is vatID, data is
HTTPClient. Note that an entry in this map implies
an entry in the sessions map and vicea versa.
mySessions
private final Hashtable mySessions
- map of sessions to logged on clients. Key is sessionID,
data is HTTPClient. Note that an entry in this map implies
an entry in the vats map and vicea versa.
mySocket
private final Socket mySocket
myIn
private HTTPInputStream myIn
myOut
private final ByteArrayOutputStream myOut
myTcpListenAddress
private final String myTcpListenAddress
HTTPConnectionHandler
HTTPConnectionHandler(Socket socket,
Hashtable vats,
Hashtable sessions,
String listenAddress)
clientError
private void clientError(String msg)
doLogon
private void doLogon(DataInputStream in)
throws IOException
IOException
doSession
private void doSession(DataInputStream in)
throws IOException
IOException
flushInput
private void flushInput()
returnResponse
private void returnResponse(byte[] response)
run
public void run()
- Enabled:
- Specified by:
run
in interface Runnable
- Overrides:
run
in class Thread
- See Also:
java.lang.Thread#start()
,
java.lang.Thread#stop()
,
java.lang.Thread#Thread(java.lang.ThreadGroup,
java.lang.Runnable, java.lang.String)
,
java.lang.Runnable#run()
sendHTTPError
private void sendHTTPError(String msg,
byte[] sessionID)
comments?