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
acceptors, acceptorThreadCount, acceptorThreadPriority, attributes, 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 void
createSSLContext(SSLHostConfig sslHostConfig)
Create the SSLContextfor the the given SSLHostConfig.protected javax.net.ssl.SSLEngine
createSSLEngine(java.lang.String sniHostName, java.util.List<Cipher> clientRequestedCiphers, java.util.List<java.lang.String> clientRequestedApplicationProtocols)
protected void
destroySsl()
protected java.net.InetSocketAddress
getLocalAddress()
Obtain the network address the server socket is bound to.protected abstract java.nio.channels.NetworkChannel
getServerSocket()
int
getSniParseLimit()
protected SSLHostConfig.Type
getSslConfigType()
SSLImplementation
getSslImplementation()
java.lang.String
getSslImplementationName()
protected void
initialiseSsl()
boolean
isAlpnSupported()
Identifies if the endpoint supports ALPN.protected void
releaseSSLContext(SSLHostConfig sslHostConfig)
Release the SSLContext, if any, associated with the SSLHostConfig.void
setSniParseLimit(int sniParseLimit)
void
setSslImplementationName(java.lang.String s)
void
unbind()
-
Methods inherited from class org.apache.tomcat.util.net.AbstractEndpoint
addNegotiatedProtocol, addSslHostConfig, addSslHostConfig, bind, closeServerSocketGraceful, closeSocket, countDownConnection, countUpOrAwaitConnection, createExecutor, createSocketProcessor, destroy, destroySocket, doCloseServerSocket, findSslHostConfigs, getAcceptCount, getAcceptorThreadCount, getAcceptorThreadPriority, getAddress, getAttribute, getBindOnInit, getConnectionCount, getConnectionLinger, getConnectionTimeout, getCurrentThreadCount, getCurrentThreadsBusy, getDaemon, getDefaultSSLHostConfigName, getDeferAccept, getDomain, getExecutor, getExecutorTerminationTimeoutMillis, getHandler, getKeepAliveTimeout, getLocalPort, getLog, getMaxConnections, getMaxKeepAliveRequests, getMaxThreads, getMinSpareThreads, getName, getPort, getPortOffset, getPortWithOffset, getProperty, getSocketProperties, getSSLHostConfig, getTcpNoDelay, getThreadPriority, getUseSendfile, getUtilityExecutor, hasNegotiableProtocols, init, initializeConnectionLatch, isPaused, isRunning, isSSLEnabled, pause, processSocket, reloadSslHostConfig, reloadSslHostConfigs, removeSslHostConfig, resume, serverSocketAccept, setAcceptCount, setAcceptorThreadCount, setAcceptorThreadPriority, setAddress, setAttribute, setBindOnInit, setConnectionLinger, setConnectionTimeout, setDaemon, setDefaultSSLHostConfigName, setDomain, setExecutor, setExecutorTerminationTimeoutMillis, setHandler, setKeepAliveTimeout, setMaxConnections, setMaxKeepAliveRequests, setMaxThreads, setMinSpareThreads, setName, setPort, setPortOffset, setProperty, setSocketOptions, setSSLEnabled, setTcpNoDelay, setThreadPriority, setUseSendfile, setUtilityExecutor, shutdownExecutor, start, startAcceptorThreads, startInternal, stop, stopInternal
-
-
-
-
Method Detail
-
getSslImplementationName
public java.lang.String getSslImplementationName()
-
setSslImplementationName
public void setSslImplementationName(java.lang.String s)
-
getSslImplementation
public SSLImplementation getSslImplementation()
-
getSniParseLimit
public int getSniParseLimit()
-
setSniParseLimit
public void setSniParseLimit(int sniParseLimit)
-
getSslConfigType
protected SSLHostConfig.Type getSslConfigType()
- Specified by:
getSslConfigType
in classAbstractEndpoint<S,U>
-
initialiseSsl
protected void initialiseSsl() throws java.lang.Exception
- Throws:
java.lang.Exception
-
createSSLContext
protected void createSSLContext(SSLHostConfig sslHostConfig) throws java.lang.IllegalArgumentException
Description copied from class:AbstractEndpoint
Create the SSLContextfor the the given SSLHostConfig.- Specified by:
createSSLContext
in classAbstractEndpoint<S,U>
- Parameters:
sslHostConfig
- The SSLHostConfig for which the SSLContext should be created- Throws:
java.lang.IllegalArgumentException
-
destroySsl
protected void destroySsl() throws java.lang.Exception
- Throws:
java.lang.Exception
-
releaseSSLContext
protected void releaseSSLContext(SSLHostConfig sslHostConfig)
Description copied from class:AbstractEndpoint
Release the SSLContext, if any, associated with the SSLHostConfig.- Specified by:
releaseSSLContext
in classAbstractEndpoint<S,U>
- Parameters:
sslHostConfig
- The SSLHostConfig for which the SSLContext should be released
-
createSSLEngine
protected javax.net.ssl.SSLEngine createSSLEngine(java.lang.String sniHostName, java.util.List<Cipher> clientRequestedCiphers, java.util.List<java.lang.String> clientRequestedApplicationProtocols)
-
isAlpnSupported
public boolean isAlpnSupported()
Description copied from class:AbstractEndpoint
Identifies if the endpoint supports ALPN. Note that a return value oftrue
implies thatAbstractEndpoint.isSSLEnabled()
will also returntrue
.- Specified by:
isAlpnSupported
in classAbstractEndpoint<S,U>
- Returns:
true
if the endpoint supports ALPN in its current configuration, otherwisefalse
.
-
unbind
public void unbind() throws java.lang.Exception
- Specified by:
unbind
in classAbstractEndpoint<S,U>
- Throws:
java.lang.Exception
-
getServerSocket
protected abstract java.nio.channels.NetworkChannel getServerSocket()
-
getLocalAddress
protected final java.net.InetSocketAddress getLocalAddress() throws java.io.IOException
Description copied from class:AbstractEndpoint
Obtain 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:
getLocalAddress
in 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:
java.io.IOException
- If there is a problem determining the currently bound socket
-
-