public class Nio2Endpoint extends AbstractJsseEndpoint<Nio2Channel>
Modifier and Type | Class and Description |
---|---|
protected class |
Nio2Endpoint.Acceptor
With NIO2, the main acceptor thread only initiates the initial accept
but periodically checks that the connector is still accepting (if not
it will attempt to start again).
|
static class |
Nio2Endpoint.Nio2SocketWrapper |
static class |
Nio2Endpoint.SendfileData
SendfileData class.
|
protected class |
Nio2Endpoint.SocketProcessor
This class is the equivalent of the Worker, but will simply use in an
external Executor thread pool.
|
AbstractEndpoint.BindState, AbstractEndpoint.Handler<S>
acceptors, acceptorThreadCount, acceptorThreadPriority, attributes, internalExecutor, negotiableProtocols, paused, running, sm, socketProperties, sslHostConfigs, threadPriority
Constructor and Description |
---|
Nio2Endpoint() |
Modifier and Type | Method and Description |
---|---|
void |
bind()
Initialize the endpoint.
|
void |
closeSocket(SocketWrapperBase<Nio2Channel> socket) |
protected AbstractEndpoint.Acceptor |
createAcceptor()
Hook to allow Endpoints to provide a specific Acceptor implementation.
|
static void |
endInline() |
boolean |
getDeferAccept()
Is deferAccept supported?
|
int |
getKeepAliveCount()
Number of keep-alive sockets.
|
int |
getLocalPort()
Port in use.
|
protected Log |
getLog() |
int |
getReadBufSize() |
int |
getWriteBufSize() |
static boolean |
isInline() |
protected boolean |
isWorkerAvailable()
Returns true if a worker thread is available for processing.
|
void |
processSocket(SocketWrapperBase<Nio2Channel> socketWrapper,
SocketStatus socketStatus,
boolean dispatch)
Process the given SocketWrapper with the given status.
|
protected boolean |
processSocket0(SocketWrapperBase<Nio2Channel> socketWrapper,
SocketStatus status,
boolean dispatch) |
protected void |
releaseCaches() |
protected boolean |
setSocketOptions(AsynchronousSocketChannel socket)
Process the specified connection.
|
void |
setSocketProperties(SocketProperties socketProperties) |
void |
shutdownExecutor() |
static void |
startInline() |
void |
startInternal()
Start the NIO endpoint, creating acceptor, poller threads.
|
void |
stopInternal()
Stop the endpoint.
|
void |
unbind()
Deallocate NIO memory pools, and close server socket.
|
createSSLEngine, getSniParseLimit, getSslConfigType, getSslImplementation, getSslImplementationName, initialiseSsl, setSniParseLimit, setSslImplementationName
addNegotiatedProtocol, addSslHostConfig, countDownConnection, countUpOrAwaitConnection, createExecutor, destroy, findSslHostConfigs, getAcceptorThreadCount, getAcceptorThreadPriority, getAddress, getAttribute, getBacklog, getBindOnInit, getConnectionCount, getCurrentThreadCount, getCurrentThreadsBusy, getDaemon, getDefaultSSLHostConfigName, getExecutor, getExecutorTerminationTimeoutMillis, getHandler, getKeepAliveTimeout, getMaxConnections, getMaxHeaderCount, getMaxKeepAliveRequests, getMaxThreads, getMaxThreadsExecutor, getMinSpareThreads, getName, getPort, getProperty, getSocketProperties, getSoLinger, getSoTimeout, getSSLHostConfig, getTcpNoDelay, getThreadPriority, getUseSendfile, handleExceptionWithDelay, hasNegotiableProtocols, init, initializeConnectionLatch, isPaused, isRunning, isSSLEnabled, pause, releaseConnectionLatch, resume, setAcceptorThreadCount, setAcceptorThreadPriority, setAddress, setAttribute, setBacklog, setBindOnInit, setDaemon, setDefaultSSLHostConfigName, setExecutor, setExecutorTerminationTimeoutMillis, setHandler, setKeepAliveTimeout, setMaxConnections, setMaxHeaderCount, setMaxKeepAliveRequests, setMaxThreads, setMinSpareThreads, setName, setPort, setProperty, setSoLinger, setSoTimeout, setSSLEnabled, setTcpNoDelay, setThreadPriority, setUseSendfile, start, startAcceptorThreads, stop, unlockAccept
public void setSocketProperties(SocketProperties socketProperties)
public boolean getDeferAccept()
getDeferAccept
in class AbstractEndpoint<Nio2Channel>
public int getLocalPort()
getLocalPort
in class AbstractEndpoint<Nio2Channel>
protected void releaseCaches()
public int getKeepAliveCount()
public void bind() throws Exception
bind
in class AbstractEndpoint<Nio2Channel>
Exception
public void startInternal() throws Exception
startInternal
in class AbstractEndpoint<Nio2Channel>
Exception
public void stopInternal()
stopInternal
in class AbstractEndpoint<Nio2Channel>
public void unbind() throws Exception
unbind
in class AbstractJsseEndpoint<Nio2Channel>
Exception
public void shutdownExecutor()
shutdownExecutor
in class AbstractEndpoint<Nio2Channel>
public int getWriteBufSize()
public int getReadBufSize()
protected AbstractEndpoint.Acceptor createAcceptor()
AbstractEndpoint
createAcceptor
in class AbstractEndpoint<Nio2Channel>
protected boolean setSocketOptions(AsynchronousSocketChannel socket)
protected boolean isWorkerAvailable()
public void processSocket(SocketWrapperBase<Nio2Channel> socketWrapper, SocketStatus socketStatus, boolean dispatch)
AbstractEndpoint
processSocket
in class AbstractEndpoint<Nio2Channel>
socketWrapper
- The socket wrapper to processsocketStatus
- The input status to the processingdispatch
- Should the processing be performed on a new
container threadprotected boolean processSocket0(SocketWrapperBase<Nio2Channel> socketWrapper, SocketStatus status, boolean dispatch)
public void closeSocket(SocketWrapperBase<Nio2Channel> socket)
protected Log getLog()
getLog
in class AbstractEndpoint<Nio2Channel>
public static void startInline()
public static void endInline()
public static boolean isInline()
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.