|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Listener
Interface that defines the necessary methods for being a connection listener within winstone.
Method Summary | |
---|---|
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)
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).The iAmFirst variable identifies whether or not this is the initial request on on this socket (ie a keep alive or a first-time accept) |
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). |
boolean |
start()
After the listener is loaded and initialized, this starts the thread |
Method Detail |
---|
void destroy()
boolean start() throws java.io.IOException
java.io.IOException
void allocateRequestResponse(java.net.Socket socket, java.io.InputStream inSocket, java.io.OutputStream outSocket, RequestHandlerThread handler, boolean iAmFirst) throws java.io.IOException
java.io.IOException
void deallocateRequestResponse(RequestHandlerThread handler, WinstoneRequest req, WinstoneResponse rsp, WinstoneInputStream inData, WinstoneOutputStream outData)
java.lang.String parseURI(RequestHandlerThread handler, WinstoneRequest req, WinstoneResponse rsp, WinstoneInputStream inData, java.net.Socket socket, boolean iAmFirst) throws java.io.IOException
java.io.IOException
void releaseSocket(java.net.Socket socket, java.io.InputStream inSocket, java.io.OutputStream outSocket) throws java.io.IOException
java.io.IOException
boolean processKeepAlive(WinstoneRequest request, WinstoneResponse response, java.io.InputStream inSocket)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |