com.prolixtech.jaminid
Class Connection
Thread
com.prolixtech.jaminid.Connection
public class Connection
extends Thread
The connection is a thread-of-service spanwed by the Daemon. The connection
handles the IO part of the Response/Oracle/Request paradigm by creating the
request and response objects, and calling the Oracle at the appropriate time
to extract the output which will be send to the client.
Connection(Socket activeSocket, Daemon masterDaemon) - default constructor to create a Connection
|
Connection
public Connection(Socket activeSocket,
Daemon masterDaemon)
throws IOException
default constructor to create a Connection
activeSocket
- the socket on which the connection was madeemasterDaemon
- the daemon that spanwed this connection
getGMTString
public static String getGMTString(Date d)
getIPAddressString
public String getIPAddressString()
run
public void run()
The thread runs here. This essentially allows the Daemon to serve
multiple threads. ALL IO is carried out here.
sendString
protected void sendString(Object string)
throws IOException
Sends a string to the client
sendString
protected void sendString(byte[] bytes)