org.apache.tomcat.util.net
public abstract class BaseEndpoint extends Object
Field Summary | |
---|---|
protected 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. |
protected int | curThreads
Current worker threads count. |
protected int | curThreadsBusy
Current worker threads busy count. |
static String | CERTIFICATE_KEY
The Request attribute key for the client certificate chain. |
static String | CIPHER_SUITE_KEY
The Request attribute key for the cipher suite. |
protected boolean | daemon
The default is true - the created threads will be
in daemon mode. |
protected Executor | executor
External Executor based thread pool. |
protected boolean | initialized
Track the initialization state of the endpoint. |
static 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 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 | port
Server socket port. |
protected boolean | running
Running state of the endpoint. |
protected int | sequence
Sequence number used to generate thread names. |
protected static StringManager | sm |
protected int | soLinger
Socket linger. |
protected int | soTimeout
Socket timeout. |
static String | SESSION_ID_KEY
The Request attribute key for the session id.
|
protected boolean | tcpNoDelay
Socket TCP no delay. |
protected int | threadPriority
Priority of the acceptor and poller threads. |
Method Summary | |
---|---|
abstract void | destroy()
Deallocate APR memory pools, and close server socket. |
InetAddress | getAddress() |
int | getBacklog() |
int | getCurrentThreadCount()
Return the amount of threads that are managed by the pool.
|
int | getCurrentThreadsBusy()
Return the amount of threads currently busy.
|
boolean | getDaemon() |
Executor | getExecutor() |
int | getMaxSpareThreads()
Dummy maxSpareThreads property. |
int | getMaxThreads() |
int | getMinSpareThreads()
Dummy minSpareThreads property. |
String | getName() |
int | getPort() |
protected int | getSequence()
Get a sequence number used for thread naming. |
int | getSoLinger() |
int | getSoTimeout() |
boolean | getTcpNoDelay() |
int | getThreadPriority() |
abstract void | init()
Initialize the endpoint. |
boolean | isPaused()
Return the state of the endpoint.
|
boolean | isRunning()
Return the state of the endpoint.
|
void | pause()
Pause the endpoint, which will make it stop accepting new sockets. |
void | resume()
Resume the endpoint, which will make it start accepting new sockets
again. |
void | setAddress(InetAddress address) |
void | setBacklog(int backlog) |
void | setDaemon(boolean b) |
void | setExecutor(Executor executor) |
void | setMaxThreads(int maxThreads) |
void | setName(String name) |
void | setPort(int port) |
void | setSoLinger(int soLinger) |
void | setSoTimeout(int soTimeout) |
void | setTcpNoDelay(boolean tcpNoDelay) |
void | setThreadPriority(int threadPriority) |
abstract void | start()
Start the APR endpoint, creating acceptor, poller and sendfile threads. |
abstract void | stop()
Stop the endpoint. |
protected void | unlockAccept()
Unlock the server socket accept using a bugus connection. |
Returns: the amount of threads that are managed by the pool
Returns: the amount of threads currently busy
Returns: true if the endpoint is paused, false otherwise
Returns: true if the endpoint is running, false otherwise