ikrs.httpd
Class HTTPRequestDistributor

java.lang.Object
  extended by ikrs.httpd.HTTPRequestDistributor
All Implemented Interfaces:
java.lang.Runnable

public class HTTPRequestDistributor
extends java.lang.Object
implements java.lang.Runnable

This HTTPRequestDistributor is a wrapper class that processes HTTPRequests on a top level. It reads the HTTP header data and tries to find a suitable handler class to forward the request to.


Constructor Summary
HTTPRequestDistributor(HTTPHandler handler, CustomLogger logger, java.util.UUID socketID, java.net.Socket socket, HTTPConnectionUserID userID)
          The constructor to create a new HTTPRequestDistributor.
 
Method Summary
 HTTPConnectionUserID getConnectionUserID()
          Get the connection-user-ID this distributor is associated with.
 java.net.Socket getSocket()
          Get the socket this distributor operates on.
 java.util.UUID getSocketID()
          Get the socketID this distributor is associated with.
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTTPRequestDistributor

public HTTPRequestDistributor(HTTPHandler handler,
                              CustomLogger logger,
                              java.util.UUID socketID,
                              java.net.Socket socket,
                              HTTPConnectionUserID userID)
                       throws java.lang.NullPointerException
The constructor to create a new HTTPRequestDistributor.

Parameters:
handler - The http handler that passes the request to this new distributor.
logger - A logger to write log messages to.
socketID - The socket's unique ID.
socket - The originated socket itself.
Throws:
java.lang.NullPointerException
Method Detail

getSocketID

public java.util.UUID getSocketID()
Get the socketID this distributor is associated with.

Returns:
The socketID this distributor is associated with.

getSocket

public java.net.Socket getSocket()
Get the socket this distributor operates on.

Returns:
The socket this distributor operates on.

getConnectionUserID

public HTTPConnectionUserID getConnectionUserID()
Get the connection-user-ID this distributor is associated with.

Returns:
The connection-user-ID this distributor is associated with.

run

public void run()
Specified by:
run in interface java.lang.Runnable