public class Nio2Endpoint extends AbstractJsseEndpoint<Nio2Channel,java.nio.channels.AsynchronousSocketChannel>
Modifier and Type | Class | Description |
---|---|---|
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 | Description |
---|---|
Nio2Endpoint() |
Modifier and Type | Method | Description |
---|---|---|
void |
bind() |
Initialize the endpoint.
|
protected void |
closeSocket(java.nio.channels.AsynchronousSocketChannel socket) |
|
protected SocketProcessorBase<Nio2Channel> |
createSocketProcessor(SocketWrapperBase<Nio2Channel> socketWrapper,
SocketEvent event) |
|
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 java.nio.channels.NetworkChannel |
getServerSocket() |
|
static boolean |
isInline() |
|
protected java.nio.channels.AsynchronousSocketChannel |
serverSocketAccept() |
|
protected boolean |
setSocketOptions(java.nio.channels.AsynchronousSocketChannel socket) |
Process the specified connection.
|
void |
shutdownExecutor() |
|
static void |
startInline() |
|
void |
startInternal() |
Start the NIO2 endpoint, creating acceptor.
|
void |
stopInternal() |
Stop the endpoint.
|
static long |
toNio2Timeout(long timeout) |
|
void |
unbind() |
Deallocate NIO memory pools, and close server socket.
|
addNegotiatedProtocol, addSslHostConfig, addSslHostConfig, closeServerSocketGraceful, countDownConnection, countUpOrAwaitConnection, createExecutor, destroy, destroySocket, findSslHostConfigs, getAcceptCount, getAcceptorThreadCount, getAcceptorThreadPriority, getAddress, getAttribute, getBindOnInit, getConnectionCount, getConnectionLinger, getConnectionTimeout, getCurrentThreadCount, getCurrentThreadsBusy, getDaemon, getDefaultSSLHostConfigName, getDomain, getExecutor, getExecutorTerminationTimeoutMillis, getHandler, getKeepAliveTimeout, getLocalPort, getMaxConnections, getMaxKeepAliveRequests, getMaxThreads, getMinSpareThreads, getName, getPort, getProperty, getSocketProperties, getSSLHostConfig, getTcpNoDelay, getThreadPriority, getUseSendfile, hasNegotiableProtocols, init, initializeConnectionLatch, isPaused, isRunning, isSSLEnabled, pause, processSocket, reloadSslHostConfig, reloadSslHostConfigs, removeSslHostConfig, resume, setAcceptCount, setAcceptorThreadCount, setAcceptorThreadPriority, setAddress, setAttribute, setBindOnInit, setConnectionLinger, setConnectionTimeout, setDaemon, setDefaultSSLHostConfigName, setDomain, setExecutor, setExecutorTerminationTimeoutMillis, setHandler, setKeepAliveTimeout, setMaxConnections, setMaxKeepAliveRequests, setMaxThreads, setMinSpareThreads, setName, setPort, setProperty, setSSLEnabled, setTcpNoDelay, setThreadPriority, setUseSendfile, start, startAcceptorThreads, stop
createSSLContext, createSSLEngine, destroySsl, getLocalAddress, getSniParseLimit, getSslConfigType, getSslImplementation, getSslImplementationName, initialiseSsl, isAlpnSupported, releaseSSLContext, setSniParseLimit, setSslImplementationName
public boolean getDeferAccept()
getDeferAccept
in class AbstractEndpoint<Nio2Channel,java.nio.channels.AsynchronousSocketChannel>
public int getKeepAliveCount()
public void bind() throws java.lang.Exception
bind
in class AbstractEndpoint<Nio2Channel,java.nio.channels.AsynchronousSocketChannel>
java.lang.Exception
public void startInternal() throws java.lang.Exception
startInternal
in class AbstractEndpoint<Nio2Channel,java.nio.channels.AsynchronousSocketChannel>
java.lang.Exception
public void stopInternal()
stopInternal
in class AbstractEndpoint<Nio2Channel,java.nio.channels.AsynchronousSocketChannel>
public void unbind() throws java.lang.Exception
unbind
in class AbstractJsseEndpoint<Nio2Channel,java.nio.channels.AsynchronousSocketChannel>
java.lang.Exception
protected void doCloseServerSocket() throws java.io.IOException
AbstractEndpoint
doCloseServerSocket
in class AbstractEndpoint<Nio2Channel,java.nio.channels.AsynchronousSocketChannel>
java.io.IOException
- If an error occurs closing the socketpublic void shutdownExecutor()
shutdownExecutor
in class AbstractEndpoint<Nio2Channel,java.nio.channels.AsynchronousSocketChannel>
protected boolean setSocketOptions(java.nio.channels.AsynchronousSocketChannel socket)
setSocketOptions
in class AbstractEndpoint<Nio2Channel,java.nio.channels.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 closeSocket(java.nio.channels.AsynchronousSocketChannel socket)
closeSocket
in class AbstractEndpoint<Nio2Channel,java.nio.channels.AsynchronousSocketChannel>
protected java.nio.channels.NetworkChannel getServerSocket()
getServerSocket
in class AbstractJsseEndpoint<Nio2Channel,java.nio.channels.AsynchronousSocketChannel>
protected java.nio.channels.AsynchronousSocketChannel serverSocketAccept() throws java.lang.Exception
serverSocketAccept
in class AbstractEndpoint<Nio2Channel,java.nio.channels.AsynchronousSocketChannel>
java.lang.Exception
protected Log getLog()
getLog
in class AbstractEndpoint<Nio2Channel,java.nio.channels.AsynchronousSocketChannel>
protected SocketProcessorBase<Nio2Channel> createSocketProcessor(SocketWrapperBase<Nio2Channel> socketWrapper, SocketEvent event)
createSocketProcessor
in class AbstractEndpoint<Nio2Channel,java.nio.channels.AsynchronousSocketChannel>
public static long toNio2Timeout(long timeout)
public static void startInline()
public static void endInline()
public static boolean isInline()
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.