Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.mortbay.util.ThreadPool
org.mortbay.util.ThreadedServer
org.mortbay.http.ajp.AJP13Listener
Nested Class Summary |
Nested classes/interfaces inherited from class org.mortbay.util.ThreadPool | |
ThreadPool.PoolThread |
Field Summary |
Fields inherited from class org.mortbay.util.ThreadPool | |
__DAEMON , __PRIORITY |
Fields inherited from interface org.mortbay.http.HttpListener | |
ATTRIBUTE |
Constructor Summary | |
|
Method Summary | |
protected AJP13Connection |
|
protected void |
|
void |
|
int | |
int | |
int | |
String | |
String | |
HttpHandler | |
HttpServer | |
boolean | |
int | |
String | |
String[] | |
void |
|
boolean |
|
boolean |
|
boolean | |
boolean | |
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
Methods inherited from class org.mortbay.util.ThreadedServer | |
acceptSocket , acceptSocket , getAcceptQueueSize , getAcceptorThreads , getHost , getInetAddrPort , getInetAddress , getLingerTimeSecs , getMaxReadTimeMs , getPort , getServerSocket , getTcpNoDelay , handle , handleConnection , handleConnection , newServerSocket , open , setAcceptQueueSize , setAcceptorThreads , setHost , setInetAddrPort , setInetAddress , setLingerTimeSecs , setMaxReadTimeMs , setPort , setTcpNoDelay , start , stop , stopJob , toString |
Methods inherited from class org.mortbay.util.ThreadPool | |
getIdleThreads , getMaxIdleTimeMs , getMaxThreads , getMinThreads , getName , getPoolName , getThreads , getThreadsPriority , handle , isDaemon , isStarted , join , run , setDaemon , setMaxIdleTimeMs , setMaxStopTimeMs , setMaxThreads , setMinThreads , setName , setPoolName , setThreadsPriority , shrink , start , stop , stopJob |
protected AJP13Connection createConnection(Socket socket) throws IOException
Create an AJP13Connection instance. This method can be used to override the connection instance.
- Parameters:
socket
- The underlying socket.
protected void customizeRequest(Socket socket, HttpRequest request)
Customize request from socket. Derived versions of SocketListener may specialize this method to customize the request with attributes of the socket used (eg SSL session ids).
- Parameters:
request
-
public void customizeRequest(HttpConnection connection, HttpRequest request)
Customize the request from connection. This method extracts the socket from the connection and calls the customizeRequest(Socket,HttpRequest) method.
- Specified by:
- customizeRequest in interface HttpListener
- Parameters:
request
-
public int getBufferReserve()
- Specified by:
- getBufferReserve in interface HttpListener
public int getConfidentialPort()
- Specified by:
- getConfidentialPort in interface HttpListener
public String getConfidentialScheme()
- Specified by:
- getConfidentialScheme in interface HttpListener
public String getDefaultScheme()
- Specified by:
- getDefaultScheme in interface HttpListener
public HttpHandler getHttpHandler()
- Specified by:
- getHttpHandler in interface HttpListener
public boolean getIdentifyListener()
public String getIntegralScheme()
- Specified by:
- getIntegralScheme in interface HttpListener
public String[] getRemoteServers()
- Returns:
- Array of accepted remote server hostnames or IPs.
public void handleConnection(Socket socket) throws IOException
Handle Job. Implementation of ThreadPool.handle(), calls handleConnection.
- Overrides:
- handleConnection in interface ThreadedServer
- Parameters:
socket
- A Connection.
public boolean isConfidential(HttpConnection connection)
- Specified by:
- isConfidential in interface HttpListener
public boolean isIntegral(HttpConnection connection)
- Specified by:
- isIntegral in interface HttpListener
public boolean isLowOnResources()
- Specified by:
- isLowOnResources in interface HttpListener
- Returns:
- True if low on idle threads.
public boolean isOutOfResources()
- Specified by:
- isOutOfResources in interface HttpListener
- Returns:
- True if out of resources.
public void persistConnection(HttpConnection connection)
Persist the connection.
- Specified by:
- persistConnection in interface HttpListener
- Parameters:
connection
-
public void setBufferReserve(int size)
public void setBufferSize(int size)
public void setConfidentialPort(int confidentialPort)
public void setConfidentialScheme(String confidentialScheme)
public void setHttpServer(HttpServer server)
- Specified by:
- setHttpServer in interface HttpListener
public void setIdentifyListener(boolean identifyListener)
- Parameters:
identifyListener
- If true, the listener name is added to all requests as the org.mortbay.http.HttListener attribute
public void setIntegralPort(int integralPort)
public void setIntegralScheme(String integralScheme)
public void setRemoteServers(String[] servers)
Set accepted remote servers. The AJP13 protocol is not secure and contains no authentication. If remote servers are set, then this listener will only accept connections from hosts with matching addresses or hostnames.
- Parameters:
servers
- Array of accepted remote server hostnames or IPs
public void start() throws Exception
Start the LifeCycle.
- Overrides:
- start in interface ThreadedServer
public void stop() throws InterruptedException
Stop the LifeCycle. The LifeCycle may wait for current activities to complete normally, but it can be interrupted.
- Overrides:
- stop in interface ThreadedServer