Package org.apache.tomcat.util.net
Class AbstractJsseEndpoint<S,U>
- java.lang.Object
-
- org.apache.tomcat.util.net.AbstractEndpoint<S,U>
-
- org.apache.tomcat.util.net.AbstractJsseEndpoint<S,U>
-
- Direct Known Subclasses:
Nio2Endpoint,NioEndpoint
public abstract class AbstractJsseEndpoint<S,U> extends AbstractEndpoint<S,U>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.tomcat.util.net.AbstractEndpoint
AbstractEndpoint.BindState, AbstractEndpoint.Handler<S>
-
-
Field Summary
-
Fields inherited from class org.apache.tomcat.util.net.AbstractEndpoint
acceptor, acceptorThreadCount, acceptorThreadPriority, attributes, connections, internalExecutor, negotiableProtocols, paused, processorCache, running, sm, socketProperties, sslHostConfigs, threadPriority
-
-
Constructor Summary
Constructors Constructor Description AbstractJsseEndpoint()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidcreateSSLContext(SSLHostConfig sslHostConfig)Create the SSLContextfor the the given SSLHostConfig.protected SSLEnginecreateSSLEngine(String sniHostName, List<Cipher> clientRequestedCiphers, List<String> clientRequestedApplicationProtocols)protected InetSocketAddressgetLocalAddress()Obtain the network address the server socket is bound to.protected abstract NetworkChannelgetServerSocket()intgetSniParseLimit()SSLImplementationgetSslImplementation()StringgetSslImplementationName()voidinit()protected voidinitialiseSsl()booleanisAlpnSupported()Identifies if the endpoint supports ALPN.voidsetSniParseLimit(int sniParseLimit)voidsetSslImplementationName(String s)voidunbind()-
Methods inherited from class org.apache.tomcat.util.net.AbstractEndpoint
addNegotiatedProtocol, addSslHostConfig, addSslHostConfig, awaitConnectionsClose, bind, closeServerSocketGraceful, closeSocket, countDownConnection, countUpOrAwaitConnection, createExecutor, createSocketProcessor, destroy, destroySocket, destroySsl, doCloseServerSocket, findSslHostConfigs, getAcceptCount, getAcceptorThreadCount, getAcceptorThreadPriority, getAddress, getAttribute, getBacklog, getBindOnInit, getBindState, getConnectionCount, getConnectionLinger, getConnections, getConnectionTimeout, getCurrentThreadCount, getCurrentThreadsBusy, getDaemon, getDefaultSSLHostConfigName, getDeferAccept, getDomain, getExecutor, getExecutorTerminationTimeoutMillis, getHandler, getKeepAliveTimeout, getLocalPort, getLog, getMaxConnections, getMaxHeaderCount, getMaxKeepAliveRequests, getMaxThreads, getMinSpareThreads, getName, getPort, getPortOffset, getPortWithOffset, getProperty, getSocketProperties, getSoLinger, getSoTimeout, getSSLHostConfig, getTcpNoDelay, getThreadPriority, getUseAsyncIO, getUseSendfile, hasNegotiableProtocols, initializeConnectionLatch, isPaused, isRunning, isSSLEnabled, pause, processSocket, releaseConnectionLatch, releaseSSLContext, reloadSslHostConfig, reloadSslHostConfigs, removeSslHostConfig, resume, serverSocketAccept, setAcceptCount, setAcceptorThreadCount, setAcceptorThreadPriority, setAddress, setAttribute, setBacklog, setBindOnInit, setConnectionLinger, setConnectionTimeout, setDaemon, setDefaultSSLHostConfigName, setDomain, setExecutor, setExecutorTerminationTimeoutMillis, setHandler, setKeepAliveTimeout, setMaxConnections, setMaxHeaderCount, setMaxKeepAliveRequests, setMaxThreads, setMinSpareThreads, setName, setPort, setPortOffset, setProperty, setSocketOptions, setSoLinger, setSoTimeout, setSSLEnabled, setTcpNoDelay, setThreadPriority, setUseAsyncIO, setUseSendfile, shutdownExecutor, start, startAcceptorThread, startInternal, stop, stopInternal, toTimeout, unlockAccept
-
-
-
-
Method Detail
-
getSslImplementationName
public String getSslImplementationName()
-
setSslImplementationName
public void setSslImplementationName(String s)
-
getSslImplementation
public SSLImplementation getSslImplementation()
-
getSniParseLimit
public int getSniParseLimit()
-
setSniParseLimit
public void setSniParseLimit(int sniParseLimit)
-
createSSLContext
protected void createSSLContext(SSLHostConfig sslHostConfig) throws IllegalArgumentException
Description copied from class:AbstractEndpointCreate the SSLContextfor the the given SSLHostConfig.- Specified by:
createSSLContextin classAbstractEndpoint<S,U>- Parameters:
sslHostConfig- The SSLHostConfig for which the SSLContext should be created- Throws:
IllegalArgumentException
-
createSSLEngine
protected SSLEngine createSSLEngine(String sniHostName, List<Cipher> clientRequestedCiphers, List<String> clientRequestedApplicationProtocols)
-
isAlpnSupported
public boolean isAlpnSupported()
Description copied from class:AbstractEndpointIdentifies if the endpoint supports ALPN. Note that a return value oftrueimplies thatAbstractEndpoint.isSSLEnabled()will also returntrue.- Specified by:
isAlpnSupportedin classAbstractEndpoint<S,U>- Returns:
trueif the endpoint supports ALPN in its current configuration, otherwisefalse.
-
init
public void init() throws Exception- Overrides:
initin classAbstractEndpoint<S,U>- Throws:
Exception
-
unbind
public void unbind() throws Exception- Specified by:
unbindin classAbstractEndpoint<S,U>- Throws:
Exception
-
getServerSocket
protected abstract NetworkChannel getServerSocket()
-
getLocalAddress
protected final InetSocketAddress getLocalAddress() throws IOException
Description copied from class:AbstractEndpointObtain the network address the server socket is bound to. This primarily exists to enable the correct address to be used when unlocking the server socket since it removes the guess-work involved if no address is specifically set.- Specified by:
getLocalAddressin classAbstractEndpoint<S,U>- Returns:
- The network address that the server socket is listening on or null if the server socket is not currently bound.
- Throws:
IOException- If there is a problem determining the currently bound socket
-
-