winstone
Class RequestHandlerThread

java.lang.Object
  extended by winstone.RequestHandlerThread
All Implemented Interfaces:
java.lang.Runnable

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

The threads to which incoming requests get allocated.

Version:
$Id: RequestHandlerThread.java,v 1.21 2007/04/23 02:55:35 rickknowles Exp $
Author:
Rick Knowles

Constructor Summary
RequestHandlerThread(ObjectPool objectPool, int threadIndex, boolean simulateModUniqueId, boolean saveSessions)
          Constructor - this is called by the handler pool, and just sets up for when a real request comes along.
 
Method Summary
 void commenceRequestHandling(java.net.Socket socket, Listener listener)
          Assign a socket to the handler
 void destroy()
          Trigger the thread destruction for this handler
 long getRequestProcessTime()
           
 void run()
          The main thread execution code.
 void setInStream(WinstoneInputStream inStream)
           
 void setOutStream(WinstoneOutputStream outStream)
           
 void setRequest(WinstoneRequest request)
           
 void setRequestStartTime()
           
 void setResponse(WinstoneResponse response)
           
protected  void writeToAccessLog(java.lang.String originalURL, WinstoneRequest request, WinstoneResponse response, WebAppConfiguration webAppConfig)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestHandlerThread

public RequestHandlerThread(ObjectPool objectPool,
                            int threadIndex,
                            boolean simulateModUniqueId,
                            boolean saveSessions)
Constructor - this is called by the handler pool, and just sets up for when a real request comes along.

Method Detail

run

public void run()
The main thread execution code.

Specified by:
run in interface java.lang.Runnable

commenceRequestHandling

public void commenceRequestHandling(java.net.Socket socket,
                                    Listener listener)
Assign a socket to the handler


setRequest

public void setRequest(WinstoneRequest request)

setResponse

public void setResponse(WinstoneResponse response)

setInStream

public void setInStream(WinstoneInputStream inStream)

setOutStream

public void setOutStream(WinstoneOutputStream outStream)

setRequestStartTime

public void setRequestStartTime()

getRequestProcessTime

public long getRequestProcessTime()

destroy

public void destroy()
Trigger the thread destruction for this handler


writeToAccessLog

protected void writeToAccessLog(java.lang.String originalURL,
                                WinstoneRequest request,
                                WinstoneResponse response,
                                WebAppConfiguration webAppConfig)


Copyright © 2011. All Rights Reserved.