NioEndpoint (Apache Tomcat 6.0.51 API Documentation)
Keywords: org.apache.tomcat.util.net.NioEndpoint class

Overview | Package | Class | Tree | Deprecated | Index | Help
| Apache Tomcat 6.0.51
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tomcat.util.net
Class NioEndpoint

    java.lang.Object
      org.apache.tomcat.util.net.AbstractEndpoint
          org.apache.tomcat.util.net.NioEndpoint

    public class NioEndpoint

extends AbstractEndpoint

NIO tailored thread pool, providing the following services:

- Socket acceptor thread
- Socket poller thread
- Worker threads pool

When switching to Java 5, there's an opportunity to use the virtual machine's thread pool.

Author:
  Mladen Turk, Remy Maucherat, Filip Hanik

Nested Class Summary
`protected class` | `NioEndpoint.Acceptor` Server socket acceptor thread.
`static interface` | `NioEndpoint.Handler` Bare bones interface used for socket processing.
`static class` | `NioEndpoint.KeyAttachment`
`class` | `NioEndpoint.NioBufferHandler`
`class` | `NioEndpoint.Poller` Poller class.
`class` | `NioEndpoint.PollerEvent` PollerEvent, cacheable object for poller events to avoid GC
`static class` | `NioEndpoint.SendfileData` SendfileData class.
`protected class` | `NioEndpoint.SocketProcessor` This class is the equivalent of the Worker, but will simply use in an external Executor thread pool.
`static class` | `NioEndpoint.TaskQueue`
`protected class` | `NioEndpoint.Worker` Server processor class.
`class` | `NioEndpoint.WorkerStack`

Field Summary
`protected int` | `acceptorThreadCount` Acceptor thread count.
`protected int` | `acceptorThreadPriority` Priority of the acceptor threads.
`protected java.util.concurrent.atomic.AtomicInteger` | `activeSocketProcessors` Keep track of how many threads are in use
`protected java.net.InetAddress` | `address` Address for the server socket.
`protected java.lang.String` | `algorithm`
`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 java.lang.String` | `ciphers`
`protected java.lang.String[]` | `ciphersarr`
`protected java.lang.String` | `clientAuth`
`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 java.util.concurrent.ConcurrentLinkedQueue<NioEndpoint.PollerEvent>` | `eventCache` Cache for poller events
`protected java.util.concurrent.Executor` | `executor` External Executor based thread pool.
`protected NioEndpoint.Handler` | `handler` Handling of accepted sockets.
`protected boolean` | `initialized` Track the initialization state of the endpoint.
`static java.lang.String` | `KEY_SIZE_KEY` The Request attribute key for the key size.
`protected java.util.concurrent.ConcurrentLinkedQueue<NioEndpoint.KeyAttachment>` | `keyCache` Cache for key attachment objects
`protected java.lang.String` | `keystoreFile`
`protected java.lang.String` | `keystorePass`
`protected java.lang.String` | `keystoreType`
`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 java.util.concurrent.ConcurrentLinkedQueue<NioChannel>` | `nioChannels` Bytebuffer cache, each channel holds a set of buffers (two, except for SSL holds four)
`protected int` | `oomParachute` The size of the OOM parachute.
`protected byte[]` | `oomParachuteData` The oom parachute, when an OOM error happens, will release the data, giving the JVM instantly a chunk of data to be able to recover with.
`protected static java.lang.String` | `oomParachuteMsg` Make sure this string has already been allocated
`static int` | `OP_CALLBACK`
`static int` | `OP_REGISTER`
`protected boolean` | `paused` Will be set to true whenever the endpoint is paused.
`protected java.util.concurrent.atomic.AtomicInteger` | `pollerRotater`
`protected NioEndpoint.Poller[]` | `pollers` The socket poller.
`protected int` | `pollerThreadCount` Poller thread count.
`protected int` | `pollerThreadPriority` Priority of the poller threads.
`protected int` | `port` Server socket port.
`protected java.util.concurrent.ConcurrentLinkedQueue<NioEndpoint.SocketProcessor>` | `processorCache` Cache for SocketProcessor objects
`protected boolean` | `running` Running state of the endpoint.
`protected boolean` | `secure`
`protected NioSelectorPool` | `selectorPool`
`protected long` | `selectorTimeout`
`protected int` | `sequence` Sequence number used to generate thread names.
`protected java.nio.channels.ServerSocketChannel` | `serverSock` Server socket "pointer".
`static java.lang.String` | `SESSION_ID_KEY` The Request attribute key for the session id.
`protected int` | `sessionCacheSize`
`protected int` | `sessionTimeout`
`protected static StringManager` | `sm`
`protected SocketProperties` | `socketProperties`
`protected javax.net.ssl.SSLContext` | `sslContext`
`protected boolean` | `SSLEnabled` SSL engine.
`protected java.lang.String` | `sslEnabledProtocols`
`protected java.lang.String[]` | `sslEnabledProtocolsarr`
`protected java.lang.String` | `sslProtocol`
`protected java.util.concurrent.CountDownLatch` | `stopLatch`
`protected int` | `threadPriority` Priority of the worker threads.
`protected java.lang.String` | `truststoreFile`
`protected java.lang.String` | `truststorePass`
`protected java.lang.String` | `truststoreType`
`protected boolean` | `useComet` Allow comet request handling.
`protected boolean` | `useExecutor`
`protected boolean` | `useSendfile` use send file
`protected NioEndpoint.WorkerStack` | `workers` Available workers.

Constructor Summary
`NioEndpoint()`

Method Summary
`java.lang.String` | `adjustRelativePath(java.lang.String path, java.lang.String relativeTo)`
`protected void` | `checkParachute()`
`protected javax.net.ssl.SSLEngine` | `createSSLEngine()`
`protected NioEndpoint.Worker` | `createWorkerThread()` Create (or allocate) and return an available processor for use in processing a specific HTTP request, if possible.
`java.lang.String` | `defaultIfNull(java.lang.String val, java.lang.String defaultValue)`
`void` | `destroy()` Deallocate NIO memory pools, and close server socket.
`int` | `getAcceptorThreadCount()`
`int` | `getAcceptorThreadPriority()`
`java.net.InetAddress` | `getAddress()`
`java.lang.String` | `getAlgorithm()`
`int` | `getBacklog()`
`java.lang.String` | `getCiphers()`
`java.lang.String` | `getClientAuth()`
`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()`
`java.util.concurrent.Executor` | `getExecutor()`
`NioEndpoint.Handler` | `getHandler()`
`int` | `getKeepAliveCount()` Number of keepalive sockets.
`java.lang.String` | `getKeyAlias()`
`java.lang.String` | `getKeystore()`
`java.lang.String` | `getKeystoreFile()`
`java.lang.String` | `getKeystorePass()`
`java.lang.String` | `getKeystoreType()`
`int` | `getLocalPort()` Port in use.
`int` | `getMaxSpareThreads()` Dummy maxSpareThreads property.
`int` | `getMaxThreads()`
`int` | `getMinSpareThreads()` Dummy minSpareThreads property.
`java.lang.String` | `getName()`
`int` | `getOomParachute()`
`byte[]` | `getOomParachuteData()`
`NioEndpoint.Poller` | `getPoller0()` Return an available poller in true round robin fashion
`int` | `getPollerThreadCount()`
`int` | `getPollerThreadPriority()`
`int` | `getPort()`
`int` | `getReadBufSize()`
`boolean` | `getSecure()`
`NioSelectorPool` | `getSelectorPool()`
`long` | `getSelectorTimeout()`
`protected int` | `getSequence()` Get a sequence number used for thread naming.
`int` | `getSessionCacheSize()`
`int` | `getSessionTimeout()`
`SocketProperties` | `getSocketProperties()`
`int` | `getSoLinger()` Socket linger.
`int` | `getSoTimeout()` Socket timeout.
`javax.net.ssl.SSLContext` | `getSSLContext()`
`java.lang.String` | `getSslProtocol()`
`boolean` | `getTcpNoDelay()` Socket TCP no delay.
`int` | `getThreadPriority()`
`java.lang.String` | `getTruststoreFile()`
`java.lang.String` | `getTruststorePass()`
`java.lang.String` | `getTruststoreType()`
`boolean` | `getUseComet()`
`boolean` | `getUseExecutor()`
`boolean` | `getUseSendfile()`
`protected NioEndpoint.Worker` | `getWorkerThread()` Return a new worker thread, and block while to worker is available.
`int` | `getWriteBufSize()`
`void` | `init()` Initialize the endpoint.
`boolean` | `isPaused()` Return the state of the endpoint.
`boolean` | `isRunning()` Return the state of the endpoint.
`boolean` | `isSSLEnabled()`
`protected boolean` | `isWorkerAvailable()` Returns true if a worker thread is available for processing.
`protected NioEndpoint.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(NioChannel socket)` Process given socket.
`protected boolean` | `processSocket(NioChannel socket, SocketStatus status)` Process given socket for an event.
`protected boolean` | `processSocket(NioChannel socket, SocketStatus status, boolean dispatch)`
`protected boolean` | `reclaimParachute(boolean force)`
`protected void` | `recycleWorkerThread(NioEndpoint.Worker workerThread)` Recycle the specified Processor so that it can be used again.
`protected void` | `releaseCaches()`
`void` | `resume()` Resume the endpoint, which will make it start accepting new sockets again.
`void` | `setAcceptorThreadCount(int acceptorThreadCount)`
`void` | `setAcceptorThreadPriority(int acceptorThreadPriority)`
`void` | `setAddress(java.net.InetAddress address)`
`void` | `setAlgorithm(java.lang.String s)`
`void` | `setBacklog(int backlog)`
`void` | `setCiphers(java.lang.String s)`
`void` | `setClientAuth(java.lang.String s)`
`void` | `setDaemon(boolean b)`
`void` | `setExecutor(java.util.concurrent.Executor executor)`
`void` | `setHandler(NioEndpoint.Handler handler)`
`void` | `setKeyAlias(java.lang.String s)`
`void` | `setKeystore(java.lang.String s)`
`void` | `setKeystoreFile(java.lang.String s)`
`void` | `setKeystorePass(java.lang.String s)`
`void` | `setKeystoreType(java.lang.String s)`
`void` | `setMaxThreads(int maxThreads)`
`void` | `setName(java.lang.String name)`
`void` | `setOomParachute(int oomParachute)`
`void` | `setOomParachuteData(byte[] oomParachuteData)`
`void` | `setPollerThreadCount(int pollerThreadCount)`
`void` | `setPollerThreadPriority(int pollerThreadPriority)`
`void` | `setPort(int port)`
`boolean` | `setProperty(java.lang.String name, java.lang.String value)` Generic properties, introspected
`void` | `setSecure(boolean b)`
`void` | `setSelectorPool(NioSelectorPool selectorPool)`
`void` | `setSelectorTimeout(long timeout)`
`void` | `setSessionCacheSize(int i)`
`void` | `setSessionTimeout(int i)`
`protected boolean` | `setSocketOptions(java.nio.channels.SocketChannel socket)` Process the specified connection.
`void` | `setSocketProperties(SocketProperties socketProperties)`
`void` | `setSoLinger(int soLinger)`
`void` | `setSoTimeout(int soTimeout)`
`void` | `setSSLContext(javax.net.ssl.SSLContext c)`
`void` | `setSSLEnabled(boolean SSLEnabled)`
`void` | `setSslEnabledProtocols(java.lang.String s)`
`void` | `setSslProtocol(java.lang.String s)`
`void` | `setTcpNoDelay(boolean tcpNoDelay)`
`void` | `setThreadPriority(int threadPriority)`
`void` | `setTruststoreFile(java.lang.String s)`
`void` | `setTruststorePass(java.lang.String truststorePass)`
`void` | `setTruststoreType(java.lang.String truststoreType)`
`void` | `setUseComet(boolean useComet)`
`void` | `setUseExecutor(boolean useexec)`
`void` | `setUseSendfile(boolean useSendfile)`
`void` | `start()` Start the NIO endpoint, creating acceptor, poller threads.
`void` | `stop()` Stop the endpoint.
`protected void` | `unlockAccept()` Unlock the server socket accept using a bogus connection.
`javax.net.ssl.KeyManager[]` | `wrap(javax.net.ssl.KeyManager[] managers)`

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

### log

    protected static Log log

### sm

    protected static StringManager sm

### CIPHER_SUITE_KEY

    public static final java.lang.String CIPHER_SUITE_KEY

  The Request attribute key for the cipher suite.

  See Also:
    Constant Field Values

### KEY_SIZE_KEY

    public static final java.lang.String KEY_SIZE_KEY

  The Request attribute key for the key size.

  See Also:
    Constant Field Values

### CERTIFICATE_KEY

    public static final java.lang.String CERTIFICATE_KEY

  The Request attribute key for the client certificate chain.

  See Also:
    Constant Field Values

### SESSION_ID_KEY

    public static final java.lang.String SESSION_ID_KEY

  The Request attribute key for the session id. This one is a Tomcat extension to the Servlet spec.

  See Also:
    Constant Field Values

### OP_REGISTER

    public static final int OP_REGISTER

See Also:
  Constant Field Values

### OP_CALLBACK

    public static final int OP_CALLBACK

See Also:
  Constant Field Values

### workers

    protected NioEndpoint.WorkerStack workers

  Available workers.

### running

    protected volatile boolean running

  Running state of the endpoint.

### paused

    protected volatile boolean paused

  Will be set to true whenever the endpoint is paused.

### initialized

    protected boolean initialized

  Track the initialization state of the endpoint.

### curThreadsBusy

    protected int curThreadsBusy

  Current worker threads busy count.

### curThreads

    protected int curThreads

  Current worker threads count.

### sequence

    protected int sequence

  Sequence number used to generate thread names.

### selectorPool

    protected NioSelectorPool selectorPool

### serverSock

    protected java.nio.channels.ServerSocketChannel serverSock

  Server socket "pointer".

### useSendfile

    protected boolean useSendfile

  use send file

### oomParachute

    protected int oomParachute

  The size of the OOM parachute.

### oomParachuteData

    protected byte[] oomParachuteData

  The oom parachute, when an OOM error happens, will release the data, giving the JVM instantly a chunk of data to be able to recover with.

### oomParachuteMsg

    protected static final java.lang.String oomParachuteMsg

  Make sure this string has already been allocated

  See Also:
    Constant Field Values

### activeSocketProcessors

    protected java.util.concurrent.atomic.AtomicInteger activeSocketProcessors

  Keep track of how many threads are in use

### stopLatch

    protected volatile java.util.concurrent.CountDownLatch stopLatch

### processorCache

    protected java.util.concurrent.ConcurrentLinkedQueue<NioEndpoint.SocketProcessor> processorCache

  Cache for SocketProcessor objects

### keyCache

    protected java.util.concurrent.ConcurrentLinkedQueue<NioEndpoint.KeyAttachment> keyCache

  Cache for key attachment objects

### eventCache

    protected java.util.concurrent.ConcurrentLinkedQueue<NioEndpoint.PollerEvent> eventCache

  Cache for poller events

### nioChannels

    protected java.util.concurrent.ConcurrentLinkedQueue<NioChannel> nioChannels

  Bytebuffer cache, each channel holds a set of buffers (two, except for SSL holds four)

### executor

    protected java.util.concurrent.Executor executor

  External Executor based thread pool.

### useExecutor

    protected boolean useExecutor

### maxThreads

    protected int maxThreads

  Maximum amount of worker threads.

### threadPriority

    protected int threadPriority

  Priority of the worker threads.

### acceptorThreadPriority

    protected int acceptorThreadPriority

  Priority of the acceptor threads.

### pollerThreadPriority

    protected int pollerThreadPriority

  Priority of the poller threads.

### port

    protected int port

  Server socket port.

### address

    protected java.net.InetAddress address

  Address for the server socket.

### handler

    protected NioEndpoint.Handler handler

  Handling of accepted sockets.

### backlog

    protected int backlog

  Allows the server developer to specify the backlog that should be used for server sockets. By default, this value is 100.

### socketProperties

    protected SocketProperties socketProperties

### daemon

    protected boolean daemon

  The default is true - the created threads will be in daemon mode. If set to false, the control thread will not be daemon - and will keep the process alive.

### name

    protected java.lang.String name

  Name of the thread pool, which will be used for naming child threads.

### useComet

    protected boolean useComet

  Allow comet request handling.

### acceptorThreadCount

    protected int acceptorThreadCount

  Acceptor thread count.

### pollerThreadCount

    protected int pollerThreadCount

  Poller thread count.

### selectorTimeout

    protected long selectorTimeout

### pollers

    protected NioEndpoint.Poller[] pollers

  The socket poller.

### pollerRotater

    protected java.util.concurrent.atomic.AtomicInteger pollerRotater

### truststoreFile

    protected java.lang.String truststoreFile

### truststorePass

    protected java.lang.String truststorePass

### truststoreType

    protected java.lang.String truststoreType

### keystoreFile

    protected java.lang.String keystoreFile

### algorithm

    protected java.lang.String algorithm

### clientAuth

    protected java.lang.String clientAuth

### keystorePass

    protected java.lang.String keystorePass

### keystoreType

    protected java.lang.String keystoreType

### sslProtocol

    protected java.lang.String sslProtocol

### sslEnabledProtocols

    protected java.lang.String sslEnabledProtocols

### sslEnabledProtocolsarr

    protected java.lang.String[] sslEnabledProtocolsarr

### ciphers

    protected java.lang.String ciphers

### ciphersarr

    protected java.lang.String[] ciphersarr

### sessionCacheSize

    protected int sessionCacheSize

### sessionTimeout

    protected int sessionTimeout

### SSLEnabled

    protected boolean SSLEnabled

  SSL engine.

### secure

    protected boolean secure

### sslContext

    protected javax.net.ssl.SSLContext sslContext

Constructor Detail

### NioEndpoint

    public NioEndpoint()

Method Detail

### setExecutor

    public void setExecutor(java.util.concurrent.Executor executor)

### getExecutor

    public java.util.concurrent.Executor getExecutor()

### setUseExecutor

    public void setUseExecutor(boolean useexec)

### getUseExecutor

    public boolean getUseExecutor()

### setMaxThreads

    public void setMaxThreads(int maxThreads)

### getMaxThreads

    public int getMaxThreads()

### setThreadPriority

    public void setThreadPriority(int threadPriority)

### getThreadPriority

    public int getThreadPriority()

### setAcceptorThreadPriority

    public void setAcceptorThreadPriority(int acceptorThreadPriority)

### getAcceptorThreadPriority

    public int getAcceptorThreadPriority()

### setPollerThreadPriority

    public void setPollerThreadPriority(int pollerThreadPriority)

### getPollerThreadPriority

    public int getPollerThreadPriority()

### getPort

    public int getPort()

### setPort

    public void setPort(int port)

### getAddress

    public java.net.InetAddress getAddress()

### setAddress

    public void setAddress(java.net.InetAddress address)

### setHandler

    public void setHandler(NioEndpoint.Handler handler)

### getHandler

    public NioEndpoint.Handler getHandler()

### setBacklog

    public void setBacklog(int backlog)

### getBacklog

    public int getBacklog()

### getTcpNoDelay

    public boolean getTcpNoDelay()

  Socket TCP no delay.

### setTcpNoDelay

    public void setTcpNoDelay(boolean tcpNoDelay)

### getSoLinger

    public int getSoLinger()

  Socket linger.

### setSoLinger

    public void setSoLinger(int soLinger)

### getSoTimeout

    public int getSoTimeout()

  Socket timeout.

### setSoTimeout

    public void setSoTimeout(int soTimeout)

### setDaemon

    public void setDaemon(boolean b)

### getDaemon

    public boolean getDaemon()

### setName

    public void setName(java.lang.String name)

### getName

    public java.lang.String getName()

### setUseComet

    public void setUseComet(boolean useComet)

### getUseComet

    public boolean getUseComet()

### setAcceptorThreadCount

    public void setAcceptorThreadCount(int acceptorThreadCount)

### getAcceptorThreadCount

    public int getAcceptorThreadCount()

### setPollerThreadCount

    public void setPollerThreadCount(int pollerThreadCount)

### getPollerThreadCount

    public int getPollerThreadCount()

### setSelectorTimeout

    public void setSelectorTimeout(long timeout)

### getSelectorTimeout

    public long getSelectorTimeout()

### getPoller0

    public NioEndpoint.Poller getPoller0()

  Return an available poller in true round robin fashion

### getMaxSpareThreads

    public int getMaxSpareThreads()

  Dummy maxSpareThreads property.

### getMinSpareThreads

    public int getMinSpareThreads()

  Dummy minSpareThreads property.

### setProperty

    public boolean setProperty(java.lang.String name,
                               java.lang.String value)

  Generic properties, introspected

### adjustRelativePath

    public java.lang.String adjustRelativePath(java.lang.String path,
                                               java.lang.String relativeTo)

### defaultIfNull

    public java.lang.String defaultIfNull(java.lang.String val,
                                          java.lang.String defaultValue)

### setTruststoreFile

    public void setTruststoreFile(java.lang.String s)

### getTruststoreFile

    public java.lang.String getTruststoreFile()

### setTruststorePass

    public void setTruststorePass(java.lang.String truststorePass)

### getTruststorePass

    public java.lang.String getTruststorePass()

### setTruststoreType

    public void setTruststoreType(java.lang.String truststoreType)

### getTruststoreType

    public java.lang.String getTruststoreType()

### getKeystoreFile

    public java.lang.String getKeystoreFile()

### setKeystoreFile

    public void setKeystoreFile(java.lang.String s)

### setKeystore

    public void setKeystore(java.lang.String s)

### getKeystore

    public java.lang.String getKeystore()

### getKeyAlias

    public java.lang.String getKeyAlias()

### setKeyAlias

    public void setKeyAlias(java.lang.String s)

### getAlgorithm

    public java.lang.String getAlgorithm()

### setAlgorithm

    public void setAlgorithm(java.lang.String s)

### getClientAuth

    public java.lang.String getClientAuth()

### setClientAuth

    public void setClientAuth(java.lang.String s)

### getKeystorePass

    public java.lang.String getKeystorePass()

### setKeystorePass

    public void setKeystorePass(java.lang.String s)

### getKeystoreType

    public java.lang.String getKeystoreType()

### setKeystoreType

    public void setKeystoreType(java.lang.String s)

### getSslProtocol

    public java.lang.String getSslProtocol()

### setSslProtocol

    public void setSslProtocol(java.lang.String s)

### setSslEnabledProtocols

    public void setSslEnabledProtocols(java.lang.String s)

### getCiphers

    public java.lang.String getCiphers()

### setCiphers

    public void setCiphers(java.lang.String s)

### getSessionCacheSize

    public int getSessionCacheSize()

### setSessionCacheSize

    public void setSessionCacheSize(int i)

### getSessionTimeout

    public int getSessionTimeout()

### setSessionTimeout

    public void setSessionTimeout(int i)

### isSSLEnabled

    public boolean isSSLEnabled()

### setSSLEnabled

    public void setSSLEnabled(boolean SSLEnabled)

### getSecure

    public boolean getSecure()

### setSecure

    public void setSecure(boolean b)

### setSelectorPool

    public void setSelectorPool(NioSelectorPool selectorPool)

### setSocketProperties

    public void setSocketProperties(SocketProperties socketProperties)

### setUseSendfile

    public void setUseSendfile(boolean useSendfile)

### setOomParachute

    public void setOomParachute(int oomParachute)

### setOomParachuteData

    public void setOomParachuteData(byte[] oomParachuteData)

### getSSLContext

    public javax.net.ssl.SSLContext getSSLContext()

### setSSLContext

    public void setSSLContext(javax.net.ssl.SSLContext c)

### getLocalPort

    public int getLocalPort()

  Port in use.

  Specified by:
    `getLocalPort` in class `AbstractEndpoint`

### checkParachute

    protected void checkParachute()

### reclaimParachute

    protected boolean reclaimParachute(boolean force)

### releaseCaches

    protected void releaseCaches()

### getKeepAliveCount

    public int getKeepAliveCount()

  Number of keepalive sockets.

### getCurrentThreadCount

    public int getCurrentThreadCount()

  Return the amount of threads that are managed by the pool.

  Returns:
    the amount of threads that are managed by the pool

### getCurrentThreadsBusy

    public int getCurrentThreadsBusy()

  Return the amount of threads that are in use

  Returns:
    the amount of threads that are in use

### isRunning

    public boolean isRunning()

  Return the state of the endpoint.

  Returns:
    true if the endpoint is running, false otherwise

### isPaused

    public boolean isPaused()

  Return the state of the endpoint.

  Returns:
    true if the endpoint is paused, false otherwise

### init

    public void init()
              throws java.lang.Exception

  Initialize the endpoint.

  Throws:
    `java.lang.Exception`

### wrap

    public javax.net.ssl.KeyManager[] wrap(javax.net.ssl.KeyManager[] managers)

### start

    public void start()
               throws java.lang.Exception

  Start the NIO endpoint, creating acceptor, poller threads.

  Throws:
    `java.lang.Exception`

### pause

    public void pause()

  Pause the endpoint, which will make it stop accepting new sockets.

### resume

    public void resume()

  Resume the endpoint, which will make it start accepting new sockets again.

### stop

    public void stop()

  Stop the endpoint. This will cause all processing threads to stop.

### destroy

    public void destroy()
                 throws java.lang.Exception

  Deallocate NIO memory pools, and close server socket.

  Throws:
    `java.lang.Exception`

### getSequence

    protected int getSequence()

  Get a sequence number used for thread naming.

### getWriteBufSize

    public int getWriteBufSize()

### getReadBufSize

    public int getReadBufSize()

### getSelectorPool

    public NioSelectorPool getSelectorPool()

### getSocketProperties

    public SocketProperties getSocketProperties()

### getUseSendfile

    public boolean getUseSendfile()

### getOomParachute

    public int getOomParachute()

### getOomParachuteData

    public byte[] getOomParachuteData()

### unlockAccept

    protected void unlockAccept()

  Unlock the server socket accept using a bogus connection.

### setSocketOptions

    protected boolean setSocketOptions(java.nio.channels.SocketChannel socket)

  Process the specified connection.

### createSSLEngine

    protected javax.net.ssl.SSLEngine createSSLEngine()

### isWorkerAvailable

    protected boolean isWorkerAvailable()

  Returns true if a worker thread is available for processing.

  Returns:
    boolean

### createWorkerThread

    protected NioEndpoint.Worker createWorkerThread()

  Create (or allocate) and return an available processor for use in processing a specific HTTP request, if possible. If the maximum allowed processors have already been created and are in use, return `null` instead.

### newWorkerThread

    protected NioEndpoint.Worker newWorkerThread()

  Create and return a new processor suitable for processing HTTP requests and returning the corresponding responses.

### getWorkerThread

    protected NioEndpoint.Worker getWorkerThread()

  Return a new worker thread, and block while to worker is available.

### recycleWorkerThread

    protected void recycleWorkerThread(NioEndpoint.Worker workerThread)

  Recycle the specified Processor so that it can be used again.

  Parameters:
    `workerThread` - The processor to be recycled

### processSocket

    protected boolean processSocket(NioChannel socket)

  Process given socket.

### processSocket

    protected boolean processSocket(NioChannel socket,
                                    SocketStatus status)

  Process given socket for an event.

### processSocket

    protected boolean processSocket(NioChannel socket,
                                    SocketStatus status,
                                    boolean dispatch)

Overview | Package | Class | Tree | Deprecated | Index | Help
| Apache Tomcat 6.0.51
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.