|
Apache Tomcat 6.0.53 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tomcat.util.net.AbstractEndpoint org.apache.tomcat.util.net.AprEndpoint
public class AprEndpoint
APR tailored thread pool, providing the following services:
Nested Class Summary | |
---|---|
protected class |
AprEndpoint.Acceptor
Server socket acceptor thread. |
static interface |
AprEndpoint.Handler
Bare bones interface used for socket processing. |
class |
AprEndpoint.Poller
Poller class. |
class |
AprEndpoint.Sendfile
Sendfile class. |
static class |
AprEndpoint.SendfileData
SendfileData class. |
protected class |
AprEndpoint.SocketEventProcessor
This class is the equivalent of the Worker, but will simply use in an external Executor thread pool. |
protected class |
AprEndpoint.SocketProcessor
This class is the equivalent of the Worker, but will simply use in an external Executor thread pool. |
protected class |
AprEndpoint.SocketWithOptionsProcessor
This class is the equivalent of the Worker, but will simply use in an external Executor thread pool. |
protected class |
AprEndpoint.Worker
Server processor class. |
class |
AprEndpoint.WorkerStack
|
Field Summary | |
---|---|
protected int |
acceptorThreadCount
Acceptor thread count. |
protected java.net.InetAddress |
address
Address for the server socket. |
protected int |
backlog
Allows the server developer to specify the backlog that should be used for server sockets. |
static java.lang.String |
CERTIFICATE_KEY
The Request attribute key for the client certificate chain. |
static java.lang.String |
CIPHER_SUITE_KEY
The Request attribute key for the cipher suite. |
protected int |
cometPollerRoundRobin
|
protected AprEndpoint.Poller[] |
cometPollers
The socket poller used for Comet support. |
protected int |
curThreads
Current worker threads count. |
protected int |
curThreadsBusy
Current worker threads busy count. |
protected boolean |
daemon
The default is true - the created threads will be in daemon mode. |
protected boolean |
deferAccept
Defer accept. |
protected java.util.concurrent.Executor |
executor
External Executor based thread pool. |
protected AprEndpoint.Handler |
handler
Handling of accepted sockets. |
protected boolean |
initialized
Track the initialization state of the endpoint. |
protected int |
keepAliveTimeout
Keep-Alive timeout. |
static java.lang.String |
KEY_SIZE_KEY
The Request attribute key for the key size. |
protected static Log |
log
|
protected int |
maxThreads
Maximum amount of worker threads. |
protected java.lang.String |
name
Name of the thread pool, which will be used for naming child threads. |
protected boolean |
paused
Will be set to true whenever the endpoint is paused. |
protected int |
pollerRoundRobin
|
protected AprEndpoint.Poller[] |
pollers
The socket poller. |
protected int |
pollerSize
Size of the socket poller. |
protected int |
pollerThreadCount
Poller thread count. |
protected int |
pollTime
Poll interval, in microseconds. |
protected int |
port
Server socket port. |
protected long |
rootPool
Root APR memory pool. |
protected boolean |
running
Running state of the endpoint. |
protected int |
sendfileRoundRobin
|
protected AprEndpoint.Sendfile[] |
sendfiles
The static file sender. |
protected int |
sendfileSize
Size of the sendfile (= concurrent files which can be served). |
protected int |
sendfileThreadCount
Sendfile thread count. |
protected int |
sequence
Sequence number used to generate thread names. |
protected long |
serverSock
Server socket "pointer". |
protected long |
serverSockPool
APR memory pool for the server socket. |
static java.lang.String |
SESSION_ID_KEY
The Request attribute key for the session id. |
protected static StringManager |
sm
|
protected int |
soLinger
Socket linger. |
protected int |
soTimeout
Socket timeout. |
protected java.lang.String |
SSLCACertificateFile
SSL CA certificate file. |
protected java.lang.String |
SSLCACertificatePath
SSL CA certificate path. |
protected java.lang.String |
SSLCARevocationFile
SSL CA revocation file. |
protected java.lang.String |
SSLCARevocationPath
SSL CA revocation path. |
protected java.lang.String |
SSLCertificateChainFile
SSL certificate chain file. |
protected java.lang.String |
SSLCertificateFile
SSL certificate file. |
protected java.lang.String |
SSLCertificateKeyFile
SSL certificate key file. |
protected java.lang.String |
SSLCipherSuite
SSL cipher suite. |
protected long |
sslContext
SSL context. |
protected boolean |
SSLDisableCompression
Disables compression of the SSL stream. |
protected boolean |
SSLEnabled
SSL engine. |
protected boolean |
SSLHonorCipherOrder
|
protected java.lang.String |
SSLPassword
SSL password (if a cert is encrypted, and no password has been provided, a callback will ask for a password). |
protected java.lang.String |
SSLProtocol
SSL protocols. |
protected java.lang.String |
SSLVerifyClient
SSL verify client. |
protected int |
SSLVerifyDepth
SSL verify depth. |
protected boolean |
tcpNoDelay
Socket TCP no delay. |
protected int |
threadPriority
Priority of the acceptor and poller threads. |
protected int |
unlockTimeout
Unlock timeout. |
protected boolean |
useComet
Allow comet request handling. |
protected boolean |
useSendfile
Use endfile for sending static files. |
protected AprEndpoint.WorkerStack |
workers
Available workers. |
Constructor Summary | |
---|---|
AprEndpoint()
|
Method Summary | |
---|---|
protected long |
allocatePoller(int size,
long pool,
int timeout)
Allocate a new poller of the specified size. |
protected AprEndpoint.Worker |
createWorkerThread()
Create (or allocate) and return an available processor for use in processing a specific HTTP request, if possible. |
void |
destroy()
Deallocate APR memory pools, and close server socket. |
int |
getAcceptorThreadCount()
|
java.net.InetAddress |
getAddress()
|
int |
getBacklog()
|
AprEndpoint.Poller |
getCometPoller()
|
int |
getCurrentThreadCount()
Return the amount of threads that are managed by the pool. |
int |
getCurrentThreadsBusy()
Return the amount of threads that are in use |
boolean |
getDaemon()
|
boolean |
getDeferAccept()
|
java.util.concurrent.Executor |
getExecutor()
|
AprEndpoint.Handler |
getHandler()
|
int |
getKeepAliveCount()
Number of keepalive sockets. |
int |
getKeepAliveTimeout()
|
int |
getLocalPort()
Port in use. |
int |
getMaxSpareThreads()
Dummy maxSpareThreads property. |
int |
getMaxThreads()
|
int |
getMinSpareThreads()
Dummy minSpareThreads property. |
java.lang.String |
getName()
|
AprEndpoint.Poller |
getPoller()
|
int |
getPollerSize()
|
int |
getPollerThreadCount()
|
int |
getPollTime()
|
int |
getPort()
|
AprEndpoint.Sendfile |
getSendfile()
|
int |
getSendfileCount()
Number of sendfile sockets. |
int |
getSendfileSize()
|
int |
getSendfileThreadCount()
|
protected int |
getSequence()
Get a sequence number used for thread naming. |
int |
getSoLinger()
|
int |
getSoTimeout()
|
java.lang.String |
getSSLCACertificateFile()
|
java.lang.String |
getSSLCACertificatePath()
|
java.lang.String |
getSSLCARevocationFile()
|
java.lang.String |
getSSLCARevocationPath()
|
java.lang.String |
getSSLCertificateChainFile()
|
java.lang.String |
getSSLCertificateFile()
|
java.lang.String |
getSSLCertificateKeyFile()
|
java.lang.String |
getSSLCipherSuite()
|
boolean |
getSSLDisableCompression()
|
boolean |
getSSLHonorCipherOrder()
|
java.lang.String |
getSSLPassword()
|
java.lang.String |
getSSLProtocol()
|
java.lang.String |
getSSLVerifyClient()
|
int |
getSSLVerifyDepth()
|
boolean |
getTcpNoDelay()
|
int |
getThreadPriority()
|
int |
getUnlockTimeout()
|
boolean |
getUseComet()
|
boolean |
getUseSendfile()
|
protected AprEndpoint.Worker |
getWorkerThread()
Return a new worker thread, and block while to worker is available. |
void |
init()
Initialize the endpoint. |
boolean |
isPaused()
Return the state of the endpoint. |
boolean |
isRunning()
Return the state of the endpoint. |
boolean |
isSSLEnabled()
|
protected AprEndpoint.Worker |
newWorkerThread()
Create and return a new processor suitable for processing HTTP requests and returning the corresponding responses. |
void |
pause()
Pause the endpoint, which will make it stop accepting new sockets. |
protected boolean |
processSocket(long socket)
Process given socket. |
protected boolean |
processSocket(long socket,
SocketStatus status)
Process given socket for an event. |
protected boolean |
processSocketWithOptions(long socket)
Process given socket. |
protected void |
recycleWorkerThread(AprEndpoint.Worker workerThread)
Recycle the specified Processor so that it can be used again. |
void |
resume()
Resume the endpoint, which will make it start accepting new sockets again. |
void |
setAcceptorThreadCount(int acceptorThreadCount)
|
void |
setAddress(java.net.InetAddress address)
|
void |
setBacklog(int backlog)
|
void |
setDaemon(boolean b)
|
void |
setDeferAccept(boolean deferAccept)
|
void |
setExecutor(java.util.concurrent.Executor executor)
|
void |
setHandler(AprEndpoint.Handler handler)
|
void |
setKeepAliveTimeout(int keepAliveTimeout)
|
void |
setMaxThreads(int maxThreads)
|
void |
setName(java.lang.String name)
|
void |
setPollerSize(int pollerSize)
|
void |
setPollerThreadCount(int pollerThreadCount)
|
void |
setPollTime(int pollTime)
|
void |
setPort(int port)
|
void |
setSendfileSize(int sendfileSize)
|
void |
setSendfileThreadCount(int sendfileThreadCount)
|
protected boolean |
setSocketOptions(long socket)
Process the specified connection. |
void |
setSoLinger(int soLinger)
|
void |
setSoTimeout(int soTimeout)
|
void |
setSSLCACertificateFile(java.lang.String SSLCACertificateFile)
|
void |
setSSLCACertificatePath(java.lang.String SSLCACertificatePath)
|
void |
setSSLCARevocationFile(java.lang.String SSLCARevocationFile)
|
void |
setSSLCARevocationPath(java.lang.String SSLCARevocationPath)
|
void |
setSSLCertificateChainFile(java.lang.String SSLCertificateChainFile)
|
void |
setSSLCertificateFile(java.lang.String SSLCertificateFile)
|
void |
setSSLCertificateKeyFile(java.lang.String SSLCertificateKeyFile)
|
void |
setSSLCipherSuite(java.lang.String SSLCipherSuite)
|
void |
setSSLDisableCompression(boolean SSLDisableCompression)
Set to true to disable SSL compression. |
void |
setSSLEnabled(boolean SSLEnabled)
|
void |
setSSLHonorCipherOrder(boolean SSLHonorCipherOrder)
Set to true to enforce the server's cipher order
instead of the default which is to allow the client to choose a
preferred cipher. |
void |
setSSLPassword(java.lang.String SSLPassword)
|
void |
setSSLProtocol(java.lang.String SSLProtocol)
|
void |
setSSLVerifyClient(java.lang.String SSLVerifyClient)
|
void |
setSSLVerifyDepth(int SSLVerifyDepth)
|
void |
setTcpNoDelay(boolean tcpNoDelay)
|
void |
setThreadPriority(int threadPriority)
|
void |
setUnlockTimeout(int unlockTimeout)
|
void |
setUseComet(boolean useComet)
|
void |
setUseSendfile(boolean useSendfile)
|
void |
start()
Start the APR endpoint, creating acceptor, poller and sendfile threads. |
void |
stop()
Stop the endpoint. |
protected void |
unlockAccept()
Unlock the server socket accept using a bugus connection. |
Methods inherited from class org.apache.tomcat.util.net.AbstractEndpoint |
---|
getMaxHeaderCount, setMaxHeaderCount |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static Log log
protected static StringManager sm
public static final java.lang.String CIPHER_SUITE_KEY
public static final java.lang.String KEY_SIZE_KEY
public static final java.lang.String CERTIFICATE_KEY
public static final java.lang.String SESSION_ID_KEY
protected AprEndpoint.WorkerStack workers
protected volatile boolean running
protected volatile boolean paused
protected boolean initialized
protected int curThreadsBusy
protected int curThreads
protected int sequence
protected long rootPool
protected long serverSock
protected long serverSockPool
protected long sslContext
protected boolean deferAccept
protected java.util.concurrent.Executor executor
protected int maxThreads
protected int threadPriority
protected int pollerSize
protected int sendfileSize
protected int port
protected java.net.InetAddress address
protected AprEndpoint.Handler handler
protected int backlog
protected boolean tcpNoDelay
protected int soLinger
protected int soTimeout
protected int keepAliveTimeout
protected int pollTime
protected boolean daemon
protected java.lang.String name
protected boolean useSendfile
protected boolean useComet
protected int acceptorThreadCount
protected int sendfileThreadCount
protected int pollerThreadCount
protected AprEndpoint.Poller[] pollers
protected int pollerRoundRobin
protected AprEndpoint.Poller[] cometPollers
protected int cometPollerRoundRobin
protected AprEndpoint.Sendfile[] sendfiles
protected int sendfileRoundRobin
protected int unlockTimeout
protected boolean SSLEnabled
protected java.lang.String SSLProtocol
protected java.lang.String SSLPassword
protected java.lang.String SSLCipherSuite
protected java.lang.String SSLCertificateFile
protected java.lang.String SSLCertificateKeyFile
protected java.lang.String SSLCertificateChainFile
protected java.lang.String SSLCACertificatePath
protected java.lang.String SSLCACertificateFile
protected java.lang.String SSLCARevocationPath
protected java.lang.String SSLCARevocationFile
protected java.lang.String SSLVerifyClient
protected int SSLVerifyDepth
protected boolean SSLHonorCipherOrder
protected boolean SSLDisableCompression
Constructor Detail |
---|
public AprEndpoint()
Method Detail |
---|
public void setDeferAccept(boolean deferAccept)
public boolean getDeferAccept()
public void setExecutor(java.util.concurrent.Executor executor)
public java.util.concurrent.Executor getExecutor()
public void setMaxThreads(int maxThreads)
public int getMaxThreads()
public void setThreadPriority(int threadPriority)
public int getThreadPriority()
public void setPollerSize(int pollerSize)
public int getPollerSize()
public void setSendfileSize(int sendfileSize)
public int getSendfileSize()
public int getPort()
public void setPort(int port)
public java.net.InetAddress getAddress()
public void setAddress(java.net.InetAddress address)
public void setHandler(AprEndpoint.Handler handler)
public AprEndpoint.Handler getHandler()
public void setBacklog(int backlog)
public int getBacklog()
public boolean getTcpNoDelay()
public void setTcpNoDelay(boolean tcpNoDelay)
public int getSoLinger()
public void setSoLinger(int soLinger)
public int getSoTimeout()
public void setSoTimeout(int soTimeout)
public int getKeepAliveTimeout()
public void setKeepAliveTimeout(int keepAliveTimeout)
public int getPollTime()
public void setPollTime(int pollTime)
public void setDaemon(boolean b)
public boolean getDaemon()
public void setName(java.lang.String name)
public java.lang.String getName()
public void setUseSendfile(boolean useSendfile)
public boolean getUseSendfile()
public void setUseComet(boolean useComet)
public boolean getUseComet()
public void setAcceptorThreadCount(int acceptorThreadCount)
public int getAcceptorThreadCount()
public void setSendfileThreadCount(int sendfileThreadCount)
public int getSendfileThreadCount()
public void setPollerThreadCount(int pollerThreadCount)
public int getPollerThreadCount()
public AprEndpoint.Poller getPoller()
public AprEndpoint.Poller getCometPoller()
public AprEndpoint.Sendfile getSendfile()
public int getMaxSpareThreads()
public int getMinSpareThreads()
public int getUnlockTimeout()
public void setUnlockTimeout(int unlockTimeout)
public boolean isSSLEnabled()
public void setSSLEnabled(boolean SSLEnabled)
public java.lang.String getSSLProtocol()
public void setSSLProtocol(java.lang.String SSLProtocol)
public java.lang.String getSSLPassword()
public void setSSLPassword(java.lang.String SSLPassword)
public java.lang.String getSSLCipherSuite()
public void setSSLCipherSuite(java.lang.String SSLCipherSuite)
public java.lang.String getSSLCertificateFile()
public void setSSLCertificateFile(java.lang.String SSLCertificateFile)
public java.lang.String getSSLCertificateKeyFile()
public void setSSLCertificateKeyFile(java.lang.String SSLCertificateKeyFile)
public java.lang.String getSSLCertificateChainFile()
public void setSSLCertificateChainFile(java.lang.String SSLCertificateChainFile)
public java.lang.String getSSLCACertificatePath()
public void setSSLCACertificatePath(java.lang.String SSLCACertificatePath)
public java.lang.String getSSLCACertificateFile()
public void setSSLCACertificateFile(java.lang.String SSLCACertificateFile)
public java.lang.String getSSLCARevocationPath()
public void setSSLCARevocationPath(java.lang.String SSLCARevocationPath)
public java.lang.String getSSLCARevocationFile()
public void setSSLCARevocationFile(java.lang.String SSLCARevocationFile)
public java.lang.String getSSLVerifyClient()
public void setSSLVerifyClient(java.lang.String SSLVerifyClient)
public int getSSLVerifyDepth()
public void setSSLVerifyDepth(int SSLVerifyDepth)
public void setSSLHonorCipherOrder(boolean SSLHonorCipherOrder)
true
to enforce the server's cipher order
instead of the default which is to allow the client to choose a
preferred cipher.
public boolean getSSLHonorCipherOrder()
public void setSSLDisableCompression(boolean SSLDisableCompression)
true
to disable SSL compression. This thwarts CRIME
attack.
public boolean getSSLDisableCompression()
public int getLocalPort()
getLocalPort
in class AbstractEndpoint
public int getKeepAliveCount()
public int getSendfileCount()
public int getCurrentThreadCount()
public int getCurrentThreadsBusy()
public boolean isRunning()
public boolean isPaused()
public void init() throws java.lang.Exception
java.lang.Exception
public void start() throws java.lang.Exception
java.lang.Exception
public void pause()
public void resume()
public void stop()
public void destroy() throws java.lang.Exception
java.lang.Exception
protected int getSequence()
protected void unlockAccept()
protected boolean setSocketOptions(long socket)
protected AprEndpoint.Worker createWorkerThread()
null
instead.
protected AprEndpoint.Worker newWorkerThread()
protected AprEndpoint.Worker getWorkerThread()
protected void recycleWorkerThread(AprEndpoint.Worker workerThread)
workerThread
- The processor to be recycledprotected long allocatePoller(int size, long pool, int timeout)
protected boolean processSocketWithOptions(long socket)
protected boolean processSocket(long socket)
protected boolean processSocket(long socket, SocketStatus status)
|
Apache Tomcat 6.0.53 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |