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, processorCache, 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.
|
protected SocketProcessorBase<Nio2Channel> |
createSocketProcessor(SocketWrapperBase<Nio2Channel> socketWrapper,
SocketEvent event) |
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 |
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.
|
createSSLContext, createSSLEngine, destroySsl, getSniParseLimit, getSslConfigType, getSslImplementation, getSslImplementationName, initialiseSsl, releaseSSLContext, 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, processSocket, 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>
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)
socket
- The socket channeltrue
if the socket was correctly configured
and processing may continue, false
if the socket needs to be
close immediatelyprotected SocketProcessorBase<Nio2Channel> createSocketProcessor(SocketWrapperBase<Nio2Channel> socketWrapper, SocketEvent event)
createSocketProcessor
in class AbstractEndpoint<Nio2Channel>
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-2016 Apache Software Foundation. All Rights Reserved.