public class Nio2Endpoint extends AbstractJsseEndpoint<Nio2Channel,AsynchronousSocketChannel>
| Modifier and Type | Class and Description |
|---|---|
protected class |
Nio2Endpoint.Nio2Acceptor |
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>acceptor, acceptorThreadCount, acceptorThreadPriority, attributes, connections, internalExecutor, negotiableProtocols, paused, processorCache, running, sm, socketProperties, sslHostConfigs, threadPriority| Constructor and Description |
|---|
Nio2Endpoint() |
| Modifier and Type | Method and Description |
|---|---|
void |
bind()
Initialize the endpoint.
|
protected SocketProcessorBase<Nio2Channel> |
createSocketProcessor(SocketWrapperBase<Nio2Channel> socketWrapper,
SocketEvent event) |
protected void |
destroySocket(AsynchronousSocketChannel socket)
Close the socket.
|
protected void |
doCloseServerSocket()
Actually close the server socket but don't perform any other clean-up.
|
static void |
endInline() |
boolean |
getDeferAccept()
Is deferAccept supported?
|
int |
getKeepAliveCount()
Number of keep-alive sockets.
|
protected Log |
getLog() |
protected SynchronizedStack<Nio2Channel> |
getNioChannels() |
protected NetworkChannel |
getServerSocket() |
static boolean |
isInline() |
void |
resume()
Resume the endpoint, which will make it start accepting new connections
again.
|
protected AsynchronousSocketChannel |
serverSocketAccept() |
protected boolean |
setSocketOptions(AsynchronousSocketChannel socket)
Process the specified connection.
|
void |
shutdownExecutor() |
protected void |
startAcceptorThread() |
static void |
startInline() |
void |
startInternal()
Start the NIO2 endpoint, creating acceptor.
|
void |
stopInternal()
Stop the endpoint.
|
void |
unbind()
Deallocate NIO memory pools, and close server socket.
|
createSSLContext, createSSLEngine, getLocalAddress, getSniParseLimit, getSslImplementation, getSslImplementationName, initialiseSsl, isAlpnSupported, setSniParseLimit, setSslImplementationNameaddNegotiatedProtocol, addSslHostConfig, addSslHostConfig, awaitConnectionsClose, closeServerSocketGraceful, closeSocket, countDownConnection, countUpOrAwaitConnection, createExecutor, destroy, destroySsl, findSslHostConfigs, getAcceptCount, getAcceptorThreadCount, getAcceptorThreadPriority, getAddress, getAttribute, getBindOnInit, getBindState, getConnectionCount, getConnectionLinger, getConnections, getConnectionTimeout, getCurrentThreadCount, getCurrentThreadsBusy, getDaemon, getDefaultSSLHostConfigName, getDomain, getExecutor, getExecutorTerminationTimeoutMillis, getHandler, getKeepAliveTimeout, getLocalPort, getMaxConnections, getMaxKeepAliveRequests, getMaxThreads, getMinSpareThreads, getName, getPort, getPortOffset, getPortWithOffset, getProperty, getSocketProperties, getSSLHostConfig, getTcpNoDelay, getThreadPriority, getUseAsyncIO, getUseSendfile, getUtilityExecutor, hasNegotiableProtocols, init, initializeConnectionLatch, isPaused, isRunning, isSSLEnabled, pause, processSocket, releaseSSLContext, reloadSslHostConfig, reloadSslHostConfigs, removeSslHostConfig, setAcceptCount, setAcceptorThreadCount, setAcceptorThreadPriority, setAddress, setAttribute, setBindOnInit, setConnectionLinger, setConnectionTimeout, setDaemon, setDefaultSSLHostConfigName, setDomain, setExecutor, setExecutorTerminationTimeoutMillis, setHandler, setKeepAliveTimeout, setMaxConnections, setMaxKeepAliveRequests, setMaxThreads, setMinSpareThreads, setName, setPort, setPortOffset, setProperty, setSSLEnabled, setTcpNoDelay, setThreadPriority, setUseAsyncIO, setUseSendfile, setUtilityExecutor, start, stop, toTimeout, unlockAcceptpublic boolean getDeferAccept()
getDeferAccept in class AbstractEndpoint<Nio2Channel,AsynchronousSocketChannel>public int getKeepAliveCount()
public void bind()
throws Exception
bind in class AbstractEndpoint<Nio2Channel,AsynchronousSocketChannel>Exceptionpublic void startInternal()
throws Exception
startInternal in class AbstractEndpoint<Nio2Channel,AsynchronousSocketChannel>Exceptionprotected void startAcceptorThread()
startAcceptorThread in class AbstractEndpoint<Nio2Channel,AsynchronousSocketChannel>public void resume()
AbstractEndpointresume in class AbstractEndpoint<Nio2Channel,AsynchronousSocketChannel>public void stopInternal()
stopInternal in class AbstractEndpoint<Nio2Channel,AsynchronousSocketChannel>public void unbind()
throws Exception
unbind in class AbstractJsseEndpoint<Nio2Channel,AsynchronousSocketChannel>Exceptionprotected void doCloseServerSocket()
throws IOException
AbstractEndpointdoCloseServerSocket in class AbstractEndpoint<Nio2Channel,AsynchronousSocketChannel>IOException - If an error occurs closing the socketpublic void shutdownExecutor()
shutdownExecutor in class AbstractEndpoint<Nio2Channel,AsynchronousSocketChannel>protected boolean setSocketOptions(AsynchronousSocketChannel socket)
setSocketOptions in class AbstractEndpoint<Nio2Channel,AsynchronousSocketChannel>socket - The socket channeltrue if the socket was correctly configured
and processing may continue, false if the socket needs to be
close immediatelyprotected void destroySocket(AsynchronousSocketChannel socket)
AbstractEndpointdestroySocket in class AbstractEndpoint<Nio2Channel,AsynchronousSocketChannel>socket - The newly accepted socketprotected SynchronizedStack<Nio2Channel> getNioChannels()
protected NetworkChannel getServerSocket()
getServerSocket in class AbstractJsseEndpoint<Nio2Channel,AsynchronousSocketChannel>protected AsynchronousSocketChannel serverSocketAccept() throws Exception
serverSocketAccept in class AbstractEndpoint<Nio2Channel,AsynchronousSocketChannel>Exceptionprotected Log getLog()
getLog in class AbstractEndpoint<Nio2Channel,AsynchronousSocketChannel>protected SocketProcessorBase<Nio2Channel> createSocketProcessor(SocketWrapperBase<Nio2Channel> socketWrapper, SocketEvent event)
createSocketProcessor in class AbstractEndpoint<Nio2Channel,AsynchronousSocketChannel>public static void startInline()
public static void endInline()
public static boolean isInline()
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.