org.mortbay.http.ajp
Class AJP13Connection

java.lang.Object
  |
  +--org.mortbay.http.HttpConnection
        |
        +--org.mortbay.http.ajp.AJP13Connection
All Implemented Interfaces:
OutputObserver

public class AJP13Connection
extends HttpConnection

Version:
$Id: AJP13Connection.java,v 1.21.2.3 2003/07/12 01:22:21 gregwilkins Exp $
Author:
Greg Wilkins (gregw)

Field Summary
 
Fields inherited from interface org.mortbay.util.OutputObserver
__CLOSED, __CLOSING, __COMMITING, __FIRST_WRITE, __RESET_BUFFER
 
Constructor Summary
AJP13Connection(AJP13Listener listener, java.io.InputStream in, java.io.OutputStream out, java.net.Socket socket, int bufferSize)
           
 
Method Summary
 void destroy()
           
 java.lang.String getDefaultScheme()
          Get the listeners Default scheme.
 java.lang.String getRemoteAddr()
          Get the Remote address.
 java.lang.String getRemoteHost()
          Get the Remote address.
 java.net.InetAddress getRemoteInetAddress()
          Get the Remote address.
 java.lang.String getServerName()
          Get the listeners HttpServer .
 int getServerPort()
          Get the listeners Port .
 boolean handleNext()
          Handle next request off the connection.
 boolean isSSL()
           
 
Methods inherited from class org.mortbay.http.HttpConnection
close, forceClose, getConnection, getHttpServer, getHttpTunnel, getInputStream, getListener, getObject, getOutputStream, getRequest, getResponse, handle, isThrottled, outputNotify, setHttpTunnel, setObject, setThrottled
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AJP13Connection

public AJP13Connection(AJP13Listener listener,
                       java.io.InputStream in,
                       java.io.OutputStream out,
                       java.net.Socket socket,
                       int bufferSize)
                throws java.io.IOException
Method Detail

getRemoteInetAddress

public java.net.InetAddress getRemoteInetAddress()
Get the Remote address.

Overrides:
getRemoteInetAddress in class HttpConnection
Returns:
the remote address

destroy

public void destroy()
Overrides:
destroy in class HttpConnection

getRemoteAddr

public java.lang.String getRemoteAddr()
Get the Remote address.

Overrides:
getRemoteAddr in class HttpConnection
Returns:
the remote host name

getRemoteHost

public java.lang.String getRemoteHost()
Get the Remote address.

Overrides:
getRemoteHost in class HttpConnection
Returns:
the remote host name

getServerName

public java.lang.String getServerName()
Get the listeners HttpServer . Conveniance method equivalent to getListener().getHost().

Overrides:
getServerName in class HttpConnection
Returns:
HttpServer.

getServerPort

public int getServerPort()
Get the listeners Port . Conveniance method equivalent to getListener().getPort().

Overrides:
getServerPort in class HttpConnection
Returns:
HttpServer.

getDefaultScheme

public java.lang.String getDefaultScheme()
Get the listeners Default scheme. Conveniance method equivalent to getListener().getDefaultProtocol().

Overrides:
getDefaultScheme in class HttpConnection
Returns:
HttpServer.

isSSL

public boolean isSSL()

handleNext

public boolean handleNext()
Description copied from class: HttpConnection
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.

Overrides:
handleNext in class HttpConnection
Returns:
true if the connection is still open and may provide more requests.


Copyright ? 2000 Mortbay Consulting Pty. Ltd. All Rights Reserved.