org.mortbay.http.ajp
Class AJP13Connection
- OutputObserver
public class AJP13Connection
$Id: AJP13Connection.java,v 1.34 2005/12/16 02:47:12 gregwilkins Exp $
associateThread , close , commit , destroy , disassociateThread , firstWrite , forceClose , getConnection , getDefaultScheme , getHttpServer , getHttpTunnel , getInputStream , getListener , getObject , getOutputStream , getRemoteAddr , getRemoteHost , getRemoteInetAddress , getRemotePort , getRequest , getResponse , getServerAddr , getServerName , getServerPort , handle , handleNext , isThrottled , outputNotify , readRequest , recycle , service , setHttpTunnel , setObject , setThrottled , statsRequestEnd , statsRequestStart |
AJP13Connection
public AJP13Connection(AJP13Listener listener,
InputStream in,
OutputStream out,
Socket socket,
int bufferSize)
throws IOException
destroy
public void destroy()
Destroy the connection.
called by handle when handleNext returns false.
- destroy in interface HttpConnection
firstWrite
protected void firstWrite()
throws IOException
Setup the reponse output stream.
Use the current state of the request and response, to set tranfer
parameters such as chunking and content length.
- firstWrite in interface HttpConnection
getDefaultScheme
public String getDefaultScheme()
Get the listeners Default scheme.
Conveniance method equivalent to getListener().getDefaultProtocol().
- getDefaultScheme in interface HttpConnection
getServerName
public String getServerName()
Get the listeners HttpServer .
Conveniance method equivalent to getListener().getHost().
- getServerName in interface HttpConnection
getServerPort
public int getServerPort()
Get the listeners Port .
Conveniance method equivalent to getListener().getPort().
- getServerPort in interface HttpConnection
handleNext
public boolean handleNext()
Handle next request off the connection.
The service(request,response) method is called by handle to
service each request received on the connection.
If the thread is a PoolThread, the thread is set as inactive
when waiting for a request.
If a HttpTunnel has been set on this connection, it's handle method is
called and when that completes, false is return from this method.
The Connection is set as a ThreadLocal of the calling thread and is
available via the getHttpConnection() method.
- handleNext in interface HttpConnection
- true if the connection is still open and may provide
more requests.
isSSL
public boolean isSSL()
setupOutputStream
protected void setupOutputStream()
throws IOException
Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.