public class Ajp13Listener extends java.lang.Object implements Listener, java.lang.Runnable
| Modifier and Type | Field and Description |
|---|---|
static WinstoneResourceBundle |
AJP_RESOURCES |
| Constructor and Description |
|---|
Ajp13Listener(java.util.Map args,
ObjectPool objectPool,
HostGroup hostGroup)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
allocateRequestResponse(java.net.Socket socket,
java.io.InputStream inSocket,
java.io.OutputStream outSocket,
RequestHandlerThread handler,
boolean iAmFirst)
Called by the request handler thread, because it needs specific setup
code for this connection's protocol (ie construction of request/response
objects, in/out streams, etc).
|
void |
deallocateRequestResponse(RequestHandlerThread handler,
WinstoneRequest req,
WinstoneResponse rsp,
WinstoneInputStream inData,
WinstoneOutputStream outData)
Called by the request handler thread, because it needs specific shutdown
code for this connection's protocol (ie releasing input/output streams,
etc).
|
void |
destroy()
Interrupts the listener thread.
|
java.lang.String |
parseURI(RequestHandlerThread handler,
WinstoneRequest req,
WinstoneResponse rsp,
WinstoneInputStream inData,
java.net.Socket socket,
boolean iAmFirst)
This is kind of a hack, since we have already parsed the uri to get the
input stream.
|
boolean |
processKeepAlive(WinstoneRequest request,
WinstoneResponse response,
java.io.InputStream inSocket)
Tries to wait for extra requests on the same socket.
|
void |
releaseSocket(java.net.Socket socket,
java.io.InputStream inSocket,
java.io.OutputStream outSocket)
Called by the request handler thread, because it needs specific shutdown
code for this connection's protocol if the keep-alive period expires (ie
closing sockets, etc).
|
void |
run()
The main run method.
|
boolean |
start()
After the listener is loaded and initialized, this starts the thread
|
public static final WinstoneResourceBundle AJP_RESOURCES
public Ajp13Listener(java.util.Map args,
ObjectPool objectPool,
HostGroup hostGroup)
public boolean start()
throws java.io.IOException
Listenerpublic void run()
run in interface java.lang.Runnablepublic void destroy()
public void allocateRequestResponse(java.net.Socket socket,
java.io.InputStream inSocket,
java.io.OutputStream outSocket,
RequestHandlerThread handler,
boolean iAmFirst)
throws java.net.SocketException,
java.io.IOException
allocateRequestResponse in interface Listenerjava.net.SocketExceptionjava.io.IOExceptionpublic void deallocateRequestResponse(RequestHandlerThread handler, WinstoneRequest req, WinstoneResponse rsp, WinstoneInputStream inData, WinstoneOutputStream outData)
deallocateRequestResponse in interface Listenerpublic java.lang.String parseURI(RequestHandlerThread handler, WinstoneRequest req, WinstoneResponse rsp, WinstoneInputStream inData, java.net.Socket socket, boolean iAmFirst) throws java.io.IOException
public void releaseSocket(java.net.Socket socket,
java.io.InputStream inSocket,
java.io.OutputStream outSocket)
throws java.io.IOException
releaseSocket in interface Listenerjava.io.IOExceptionpublic boolean processKeepAlive(WinstoneRequest request, WinstoneResponse response, java.io.InputStream inSocket)
processKeepAlive in interface ListenerCopyright © 2013. All Rights Reserved.