|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.mortbay.util.ThreadPool
|
+--org.mortbay.util.ThreadedServer
|
+--org.mortbay.http.ajp.AJP13Listener
AJP 1.3 Protocol Listener. This listener takes requests from the mod_jk or mod_jk2 modules used by web servers such as apache and IIS to forward requests to a servlet container.
This code uses the AJP13 code from tomcat3.3 as the protocol specification, but is new implementation.
| Nested Class Summary |
| Nested classes 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 | |
AJP13Listener()
|
|
AJP13Listener(InetAddrPort address)
|
|
| Method Summary | |
void |
customizeRequest(HttpConnection connection,
HttpRequest request)
Customize the request from connection. |
int |
getBufferReserve()
Get the size of the header reserve area. |
int |
getBufferSize()
Get the size of the buffers used by connections from this listener. |
int |
getConfidentialPort()
Get the protocol port to use for confidential redirections. |
java.lang.String |
getConfidentialScheme()
Get the protocol scheme to use for confidential redirections. |
java.lang.String |
getDefaultScheme()
Get the default scheme for requests. |
HttpServer |
getHttpServer()
Get the HttpServer instance for this HttpListener. |
boolean |
getIdentifyListener()
|
int |
getIntegralPort()
Get the protocol port to use for integral redirections. |
java.lang.String |
getIntegralScheme()
Get the protocol scheme to use for integral redirections. |
java.lang.String[] |
getRemoteServers()
|
void |
handleConnection(java.net.Socket socket)
Handle Job. |
boolean |
isConfidential(HttpConnection connection)
Get the confidential status of a connection. |
boolean |
isIntegral(HttpConnection connection)
Get the integral status of a connection. |
boolean |
isLowOnResources()
Get the low on resources state of the listener. |
boolean |
isOutOfResources()
Get the out of resources state of the listener. |
void |
persistConnection(HttpConnection connection)
Persist the connection. |
void |
setBufferReserve(int size)
|
void |
setBufferSize(int size)
|
void |
setConfidentialPort(int confidentialPort)
|
void |
setConfidentialScheme(java.lang.String confidentialScheme)
|
void |
setHttpServer(HttpServer server)
Set the HttpServer instance for this HttpListener. |
void |
setIdentifyListener(boolean identifyListener)
|
void |
setIntegralPort(int integralPort)
|
void |
setIntegralScheme(java.lang.String integralScheme)
|
void |
setRemoteServers(java.lang.String[] servers)
Set accepted remote servers. |
void |
start()
Start the LifeCycle. |
void |
stop()
Stop the LifeCycle. |
| Methods inherited from class org.mortbay.util.ThreadedServer |
getHost, getInetAddress, getInetAddrPort, getLingerTimeSecs, getMaxReadTimeMs, getPort, getServerSocket, handle, open, setHost, setInetAddress, setInetAddrPort, setLingerTimeSecs, setMaxReadTimeMs, setPort, toString |
| Methods inherited from class org.mortbay.util.ThreadPool |
getIdleThreads, getMaxIdleTimeMs, getMaxThreads, getMinThreads, getName, getPoolName, getThreads, getThreadsPriority, isDaemon, isStarted, join, run, setDaemon, setMaxIdleTimeMs, setMaxStopTimeMs, setMaxThreads, setMinThreads, setName, setPoolName, setThreadsPriority, shrink |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.mortbay.http.HttpListener |
getHost, getPort, setHost, setPort |
| Methods inherited from interface org.mortbay.util.LifeCycle |
isStarted |
| Constructor Detail |
public AJP13Listener()
public AJP13Listener(InetAddrPort address)
| Method Detail |
public void setHttpServer(HttpServer server)
HttpListener
setHttpServer in interface HttpListenerserver - The HttpServer instance this HttpListener has been added to.public HttpServer getHttpServer()
HttpListener
getHttpServer in interface HttpListenerpublic int getBufferSize()
HttpListener
getBufferSize in interface HttpListenerpublic void setBufferSize(int size)
public int getBufferReserve()
HttpListener
getBufferReserve in interface HttpListenerpublic void setBufferReserve(int size)
public boolean getIdentifyListener()
public void setIdentifyListener(boolean identifyListener)
identifyListener - If true, the listener name is added to all
requests as the org.mortbay.http.HttListener attributepublic java.lang.String getDefaultScheme()
HttpListener
getDefaultScheme in interface HttpListener
public void start()
throws java.lang.Exception
LifeCycle
start in interface LifeCyclestart in class ThreadedServerjava.lang.Exception - An arbitrary exception may be thrown.
public void stop()
throws java.lang.InterruptedException
LifeCycle
stop in interface LifeCyclestop in class ThreadedServerjava.lang.InterruptedException - Stopping a lifecycle is rarely atomic
and may be interrupted by another thread. If this happens
InterruptedException is throw and the component will be in an
indeterminant state and should probably be discarded.public java.lang.String[] getRemoteServers()
public void setRemoteServers(java.lang.String[] servers)
servers - Array of accepted remote server hostnames or IPs
public void handleConnection(java.net.Socket socket)
throws java.io.IOException
handleConnection in class ThreadedServersocket - A Connection.
java.io.IOException
public void customizeRequest(HttpConnection connection,
HttpRequest request)
customizeRequest in interface HttpListenerrequest - connection - The connection the request was received on, which must
be a HttpConnection created by this listener.public void persistConnection(HttpConnection connection)
persistConnection in interface HttpListenerconnection - public boolean isLowOnResources()
HttpListener
isLowOnResources in interface HttpListenerpublic boolean isOutOfResources()
HttpListener
isOutOfResources in interface HttpListenerpublic boolean isIntegral(HttpConnection connection)
HttpListener
isIntegral in interface HttpListenerconnection - The connection to test.
public boolean isConfidential(HttpConnection connection)
HttpListener
isConfidential in interface HttpListenerconnection - The connection to test.
public java.lang.String getIntegralScheme()
HttpListener
getIntegralScheme in interface HttpListenerpublic void setIntegralScheme(java.lang.String integralScheme)
public int getIntegralPort()
HttpListener
getIntegralPort in interface HttpListenerpublic void setIntegralPort(int integralPort)
public java.lang.String getConfidentialScheme()
HttpListener
getConfidentialScheme in interface HttpListenerpublic void setConfidentialScheme(java.lang.String confidentialScheme)
public int getConfidentialPort()
HttpListener
getConfidentialPort in interface HttpListenerpublic void setConfidentialPort(int confidentialPort)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||