| java.lang.Object org.apache.catalina.connector.http.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 author: Remy Maucherat version: $Revision: 1.46 $ $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. | protected String | normalize(String path) Return a context-relative path, beginning with a "/", that represents
the canonical version of the specified path after ".." and "." elements
are resolved out. | 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. | protected void | shutdownInput(InputStream input) | 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. | public String | toString() Return a String value representing this object. |
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.
|
normalize | protected String normalize(String path)(Code) | | Return a context-relative path, beginning with a "/", that represents
the canonical version of the specified path after ".." and "." elements
are resolved out. If the specified path attempts to go outside the
boundaries of the current context (i.e. too many ".." path elements
are present), return null instead.
Parameters: path - Path to be normalized |
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.
|
toString | public String toString()(Code) | | Return a String value representing this object.
|
|
|