| |
|
| java.lang.Object org.apache.catalina.connector.http10.HttpProcessor
HttpProcessor | final class HttpProcessor implements Lifecycle,Runnable(Code) | | Implementation of a request processor (and its associated thread) that may
be used by an HttpConnector to process individual requests. The connector
will allocate a processor from its pool, assign a particular socket to it,
and the processor will then execute the processing required to complete
the request. When the processor is completed, it will recycle itself.
author: Craig R. McClanahan version: $Revision: 1.9 $ $Date: 2002/04/04 17:50:34 $ |
Field Summary | |
protected StringManager | sm The string manager for this package. |
Constructor Summary | |
public | HttpProcessor(HttpConnector connector, int id) Construct a new HttpProcessor associated with the specified connector. |
Method Summary | |
public void | addLifecycleListener(LifecycleListener listener) Add a lifecycle event listener to this component. | synchronized void | assign(Socket socket) Process an incoming TCP/IP connection on the specified socket. | public LifecycleListener[] | findLifecycleListeners() Get the lifecycle listeners associated with this lifecycle. | public void | removeLifecycleListener(LifecycleListener listener) Remove a lifecycle event listener from this component. | public void | run() The background thread that listens for incoming TCP/IP connections and
hands them off to an appropriate processor. | public void | start() Start the background thread we will use for request processing. | public void | stop() Stop the background thread we will use for request processing. |
HttpProcessor | public HttpProcessor(HttpConnector connector, int id)(Code) | | Construct a new HttpProcessor associated with the specified connector.
Parameters: connector - HttpConnector that owns this processor Parameters: id - Identifier of this HttpProcessor (unique per connector) |
addLifecycleListener | public void addLifecycleListener(LifecycleListener listener)(Code) | | Add a lifecycle event listener to this component.
Parameters: listener - The listener to add |
assign | synchronized void assign(Socket socket)(Code) | | Process an incoming TCP/IP connection on the specified socket. Any
exception that occurs during processing must be logged and swallowed.
NOTE: This method is called from our Connector's thread. We
must assign it to our own thread so that multiple simultaneous
requests can be handled.
Parameters: socket - TCP socket to process |
findLifecycleListeners | public LifecycleListener[] findLifecycleListeners()(Code) | | Get the lifecycle listeners associated with this lifecycle. If this
Lifecycle has no listeners registered, a zero-length array is returned.
|
removeLifecycleListener | public void removeLifecycleListener(LifecycleListener listener)(Code) | | Remove a lifecycle event listener from this component.
Parameters: listener - The listener to add |
run | public void run()(Code) | | The background thread that listens for incoming TCP/IP connections and
hands them off to an appropriate processor.
|
|
|
|