Package org.apache.coyote.http11
Class AbstractHttp11Protocol<S>
- java.lang.Object
-
- org.apache.coyote.AbstractProtocol<S>
-
- org.apache.coyote.http11.AbstractHttp11Protocol<S>
-
- All Implemented Interfaces:
javax.management.MBeanRegistration
,ProtocolHandler
- Direct Known Subclasses:
AbstractHttp11JsseProtocol
,Http11AprProtocol
public abstract class AbstractHttp11Protocol<S> extends AbstractProtocol<S>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.coyote.AbstractProtocol
AbstractProtocol.ConnectionHandler<S>, AbstractProtocol.RecycledProcessors
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringManager
sm
-
Fields inherited from class org.apache.coyote.AbstractProtocol
adapter, domain, mserver, oname, processorCache, rgOname
-
-
Constructor Summary
Constructors Constructor Description AbstractHttp11Protocol(AbstractEndpoint<S,?> endpoint)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addAllowedTrailerHeader(java.lang.String header)
void
addSslHostConfig(SSLHostConfig sslHostConfig)
Add a new SSL configuration for a virtual host.void
addUpgradeProtocol(UpgradeProtocol upgradeProtocol)
Add a new protocol for used by HTTP/1.1 upgrade or ALPN.protected Processor
createProcessor()
Create and configure a new Processor instance for the current protocol implementation.protected Processor
createUpgradeProcessor(SocketWrapperBase<?> socket, UpgradeToken upgradeToken)
void
destroy()
Destroy the protocol (optional).SSLHostConfig[]
findSslHostConfigs()
Find all configured SSL virtual host configurations which will be used by SNI.UpgradeProtocol[]
findUpgradeProtocols()
Return all configured upgrade protocols.java.lang.String
getAlgorithm()
java.lang.String
getAllowedTrailerHeaders()
protected java.util.Set<java.lang.String>
getAllowedTrailerHeadersInternal()
boolean
getAllowHostHeaderMismatch()
Deprecated.This will removed in Tomcat 11 onwards whereallowHostHeaderMismatch
will be hard-coded tofalse
.java.lang.String
getCiphers()
java.lang.String
getClientAuth()
java.lang.String
getCompressibleMimeType()
java.lang.String[]
getCompressibleMimeTypes()
java.lang.String
getCompression()
protected int
getCompressionLevel()
int
getCompressionMinSize()
int
getConnectionUploadTimeout()
Specifies a different (usually longer) connection timeout during data upload.java.lang.String
getContinueResponseTiming()
ContinueResponseTiming
getContinueResponseTimingInternal()
java.lang.String
getCrlFile()
java.lang.String
getDefaultSSLHostConfigName()
boolean
getDisableUploadTimeout()
Get the flag that controls upload time-outs.protected AbstractEndpoint<S,?>
getEndpoint()
java.lang.String
getKeyAlias()
java.lang.String
getKeyPass()
java.lang.String
getKeystoreFile()
java.lang.String
getKeystorePass()
java.lang.String
getKeystoreProvider()
java.lang.String
getKeystoreType()
int
getMaxExtensionSize()
int
getMaxHttpHeaderSize()
int
getMaxHttpRequestHeaderSize()
int
getMaxHttpResponseHeaderSize()
int
getMaxKeepAliveRequests()
int
getMaxSavePostSize()
Return the maximum size of the post which will be saved during FORM or CLIENT-CERT authentication.int
getMaxSwallowSize()
int
getMaxTrailerSize()
UpgradeProtocol
getNegotiatedProtocol(java.lang.String negotiatedName)
Find a suitable handler for the protocol negotiated at the network layer.boolean
getNoCompressionStrongETag()
Deprecated.java.lang.String
getNoCompressionUserAgents()
protected java.util.regex.Pattern
getNoCompressionUserAgentsPattern()
javax.management.ObjectName
getONameForUpgrade(java.lang.String upgradeProtocol)
protected java.lang.String
getProtocolName()
Obtain the name of the protocol, (Http, Ajp, etc.).boolean
getRejectIllegalHeader()
Deprecated.This will removed in Tomcat 11 onwards whereallowHostHeaderMismatch
will be hard-coded totrue
.boolean
getRejectIllegalHeaderName()
Deprecated.Now an alias forgetRejectIllegalHeader()
.java.lang.String
getRelaxedPathChars()
java.lang.String
getRelaxedQueryChars()
java.lang.String
getRestrictedUserAgents()
Get the string form of the regular expression that defines the User agents which should be restricted to HTTP/1.0 support.protected java.util.regex.Pattern
getRestrictedUserAgentsPattern()
boolean
getSecure()
java.lang.String
getServer()
boolean
getServerRemoveAppProvidedValues()
Should application provider values for the HTTP Server header be removed.int
getSessionCacheSize()
int
getSessionTimeout()
java.lang.String
getSSLCACertificateFile()
java.lang.String
getSSLCACertificatePath()
java.lang.String
getSSLCARevocationFile()
java.lang.String
getSSLCARevocationPath()
java.lang.String
getSSLCertificateChainFile()
java.lang.String
getSSLCertificateFile()
java.lang.String
getSSLCertificateKeyFile()
java.lang.String
getSSLCipherSuite()
boolean
getSSLDisableCompression()
boolean
getSSLDisableSessionTickets()
java.lang.String
getSslEnabledProtocols()
boolean
getSSLHonorCipherOrder()
java.lang.String
getSSLPassword()
java.lang.String
getSslProtocol()
java.lang.String
getSSLProtocol()
java.lang.String
getSSLVerifyClient()
int
getSSLVerifyDepth()
java.lang.String
getTrustManagerClassName()
int
getTrustMaxCertLength()
java.lang.String
getTruststoreAlgorithm()
java.lang.String
getTruststoreFile()
java.lang.String
getTruststorePass()
java.lang.String
getTruststoreProvider()
java.lang.String
getTruststoreType()
UpgradeGroupInfo
getUpgradeGroupInfo(java.lang.String upgradeProtocol)
UpgradeProtocol
getUpgradeProtocol(java.lang.String upgradedName)
Find a suitable handler for the protocol upgraded name specified.boolean
getUseKeepAliveResponseHeader()
boolean
getUseSendfile()
boolean
getUseServerCipherSuitesOrder()
void
init()
Initialise the protocol.boolean
isSSLEnabled()
void
reloadSslHostConfig(java.lang.String hostName)
void
reloadSslHostConfigs()
void
removeAllowedTrailerHeader(java.lang.String header)
void
setAlgorithm(java.lang.String keyManagerAlgorithm)
void
setAllowedTrailerHeaders(java.lang.String commaSeparatedHeaders)
void
setAllowHostHeaderMismatch(boolean allowHostHeaderMismatch)
Deprecated.This will removed in Tomcat 11 onwards whereallowHostHeaderMismatch
will be hard-coded tofalse
.void
setCiphers(java.lang.String ciphers)
void
setClientAuth(java.lang.String certificateVerification)
void
setCompressibleMimeType(java.lang.String valueS)
void
setCompression(java.lang.String compression)
void
setCompressionMinSize(int compressionMinSize)
void
setConnectionUploadTimeout(int timeout)
Set the upload timeout.void
setContinueResponseTiming(java.lang.String continueResponseTiming)
void
setCrlFile(java.lang.String certificateRevocationListFile)
void
setDefaultSSLHostConfigName(java.lang.String defaultSSLHostConfigName)
void
setDisableUploadTimeout(boolean isDisabled)
Set the flag to control whether a separate connection timeout is used during upload of a request body.void
setKeyAlias(java.lang.String certificateKeyAlias)
void
setKeyPass(java.lang.String certificateKeyPassword)
void
setKeystoreFile(java.lang.String keystoreFile)
void
setKeystorePass(java.lang.String certificateKeystorePassword)
void
setKeystoreProvider(java.lang.String certificateKeystoreProvider)
void
setKeystoreType(java.lang.String certificateKeystoreType)
void
setMaxExtensionSize(int maxExtensionSize)
void
setMaxHttpHeaderSize(int valueI)
void
setMaxHttpRequestHeaderSize(int valueI)
void
setMaxHttpResponseHeaderSize(int valueI)
void
setMaxKeepAliveRequests(int mkar)
Set the maximum number of Keep-Alive requests to allow.void
setMaxSavePostSize(int maxSavePostSize)
Set the maximum size of a POST which will be buffered during FORM or CLIENT-CERT authentication.void
setMaxSwallowSize(int maxSwallowSize)
void
setMaxTrailerSize(int maxTrailerSize)
void
setNoCompressionStrongETag(boolean noCompressionStrongETag)
Deprecated.void
setNoCompressionUserAgents(java.lang.String noCompressionUserAgents)
void
setRejectIllegalHeader(boolean rejectIllegalHeader)
Deprecated.This will removed in Tomcat 11 onwards whereallowHostHeaderMismatch
will be hard-coded totrue
.void
setRejectIllegalHeaderName(boolean rejectIllegalHeaderName)
Deprecated.Now an alias forsetRejectIllegalHeader(boolean)
.void
setRelaxedPathChars(java.lang.String relaxedPathChars)
void
setRelaxedQueryChars(java.lang.String relaxedQueryChars)
void
setRestrictedUserAgents(java.lang.String restrictedUserAgents)
Set restricted user agent list (which will downgrade the connector to HTTP/1.0 mode).void
setSecure(boolean b)
void
setServer(java.lang.String server)
Set the server header name.void
setServerRemoveAppProvidedValues(boolean serverRemoveAppProvidedValues)
void
setSessionCacheSize(int sessionCacheSize)
void
setSessionTimeout(int sessionTimeout)
void
setSSLCACertificateFile(java.lang.String caCertificateFile)
void
setSSLCACertificatePath(java.lang.String caCertificatePath)
void
setSSLCARevocationFile(java.lang.String certificateRevocationListFile)
void
setSSLCARevocationPath(java.lang.String certificateRevocationListPath)
void
setSSLCertificateChainFile(java.lang.String certificateChainFile)
void
setSSLCertificateFile(java.lang.String certificateFile)
void
setSSLCertificateKeyFile(java.lang.String certificateKeyFile)
void
setSSLCipherSuite(java.lang.String ciphers)
void
setSSLDisableCompression(boolean disableCompression)
void
setSSLDisableSessionTickets(boolean disableSessionTickets)
void
setSSLEnabled(boolean SSLEnabled)
void
setSslEnabledProtocols(java.lang.String enabledProtocols)
void
setSSLHonorCipherOrder(boolean honorCipherOrder)
void
setSSLPassword(java.lang.String certificateKeyPassword)
void
setSslProtocol(java.lang.String sslProtocol)
void
setSSLProtocol(java.lang.String sslProtocol)
void
setSSLVerifyClient(java.lang.String certificateVerification)
void
setSSLVerifyDepth(int certificateVerificationDepth)
void
setTrustManagerClassName(java.lang.String trustManagerClassName)
void
setTrustMaxCertLength(int certificateVerificationDepth)
void
setTruststoreAlgorithm(java.lang.String truststoreAlgorithm)
void
setTruststoreFile(java.lang.String truststoreFile)
void
setTruststorePass(java.lang.String truststorePassword)
void
setTruststoreProvider(java.lang.String truststoreProvider)
void
setTruststoreType(java.lang.String truststoreType)
void
setUseKeepAliveResponseHeader(boolean useKeepAliveResponseHeader)
void
setUseSendfile(boolean useSendfile)
void
setUseServerCipherSuitesOrder(boolean honorCipherOrder)
boolean
useCompression(Request request, Response response)
-
Methods inherited from class org.apache.coyote.AbstractProtocol
addWaitingProcessor, awaitConnectionsClose, closeServerSocketGraceful, getAcceptCount, getAcceptorThreadCount, getAcceptorThreadPriority, getAdapter, getAddress, getClientCertProvider, getConnectionCount, getConnectionLinger, getConnectionTimeout, getDomain, getExecutor, getGlobalRequestProcessorMBeanName, getHandler, getId, getKeepAliveTimeout, getLocalPort, getLog, getMaxConnections, getMaxHeaderCount, getMaxThreads, getMinSpareThreads, getName, getNameIndex, getNamePrefix, getObjectName, getPort, getPortOffset, getPortWithOffset, getProcessorCache, getProperty, getTcpNoDelay, getThreadPriority, getUtilityExecutor, getWaitingProcessorCount, isAprRequired, isPaused, isSendfileSupported, pause, postDeregister, postRegister, preDeregister, preRegister, removeWaitingProcessor, resume, setAcceptCount, setAcceptorThreadCount, setAcceptorThreadPriority, setAdapter, setAddress, setClientCertProvider, setConnectionLinger, setConnectionTimeout, setExecutor, setHandler, setKeepAliveTimeout, setMaxConnections, setMaxHeaderCount, setMaxThreads, setMinSpareThreads, setPort, setPortOffset, setProcessorCache, setProperty, setTcpNoDelay, setThreadPriority, setUtilityExecutor, start, startAsyncTimeout, stop, stopAsyncTimeout
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.coyote.ProtocolHandler
getDesiredBufferSize
-
-
-
-
Field Detail
-
sm
protected static final StringManager sm
-
-
Constructor Detail
-
AbstractHttp11Protocol
public AbstractHttp11Protocol(AbstractEndpoint<S,?> endpoint)
-
-
Method Detail
-
init
public void init() throws java.lang.Exception
Description copied from interface:ProtocolHandler
Initialise the protocol.- Specified by:
init
in interfaceProtocolHandler
- Overrides:
init
in classAbstractProtocol<S>
- Throws:
java.lang.Exception
- If the protocol handler fails to initialise
-
destroy
public void destroy() throws java.lang.Exception
Description copied from interface:ProtocolHandler
Destroy the protocol (optional).- Specified by:
destroy
in interfaceProtocolHandler
- Overrides:
destroy
in classAbstractProtocol<S>
- Throws:
java.lang.Exception
- If the protocol handler fails to destroy
-
getProtocolName
protected java.lang.String getProtocolName()
Description copied from class:AbstractProtocol
Obtain the name of the protocol, (Http, Ajp, etc.). Used with JMX.- Specified by:
getProtocolName
in classAbstractProtocol<S>
- Returns:
- the protocol name
-
getEndpoint
protected AbstractEndpoint<S,?> getEndpoint()
Over-ridden here to make the method visible to nested classes.
- Overrides:
getEndpoint
in classAbstractProtocol<S>
-
getContinueResponseTiming
public java.lang.String getContinueResponseTiming()
-
setContinueResponseTiming
public void setContinueResponseTiming(java.lang.String continueResponseTiming)
-
getContinueResponseTimingInternal
public ContinueResponseTiming getContinueResponseTimingInternal()
-
getUseKeepAliveResponseHeader
public boolean getUseKeepAliveResponseHeader()
-
setUseKeepAliveResponseHeader
public void setUseKeepAliveResponseHeader(boolean useKeepAliveResponseHeader)
-
getRelaxedPathChars
public java.lang.String getRelaxedPathChars()
-
setRelaxedPathChars
public void setRelaxedPathChars(java.lang.String relaxedPathChars)
-
getRelaxedQueryChars
public java.lang.String getRelaxedQueryChars()
-
setRelaxedQueryChars
public void setRelaxedQueryChars(java.lang.String relaxedQueryChars)
-
getAllowHostHeaderMismatch
@Deprecated public boolean getAllowHostHeaderMismatch()
Deprecated.This will removed in Tomcat 11 onwards whereallowHostHeaderMismatch
will be hard-coded tofalse
.Will Tomcat accept an HTTP 1.1 request where the host header does not agree with the host specified (if any) in the request line?- Returns:
true
if Tomcat will allow such requests, otherwisefalse
-
setAllowHostHeaderMismatch
@Deprecated public void setAllowHostHeaderMismatch(boolean allowHostHeaderMismatch)
Deprecated.This will removed in Tomcat 11 onwards whereallowHostHeaderMismatch
will be hard-coded tofalse
.Will Tomcat accept an HTTP 1.1 request where the host header does not agree with the host specified (if any) in the request line?- Parameters:
allowHostHeaderMismatch
-true
to allow such requests,false
to reject them with a 400
-
getRejectIllegalHeader
@Deprecated public boolean getRejectIllegalHeader()
Deprecated.This will removed in Tomcat 11 onwards whereallowHostHeaderMismatch
will be hard-coded totrue
.If an HTTP request is received that contains an illegal header name or value (e.g. the header name is not a token) will the request be rejected (with a 400 response) or will the illegal header be ignored?- Returns:
true
if the request will be rejected orfalse
if the header will be ignored
-
setRejectIllegalHeader
@Deprecated public void setRejectIllegalHeader(boolean rejectIllegalHeader)
Deprecated.This will removed in Tomcat 11 onwards whereallowHostHeaderMismatch
will be hard-coded totrue
.If an HTTP request is received that contains an illegal header name or value (e.g. the header name is not a token) should the request be rejected (with a 400 response) or should the illegal header be ignored?- Parameters:
rejectIllegalHeader
-true
to reject requests with illegal header names or values,false
to ignore the header
-
getRejectIllegalHeaderName
@Deprecated public boolean getRejectIllegalHeaderName()
Deprecated.Now an alias forgetRejectIllegalHeader()
. Will be removed in Tomcat 10 onwards.If an HTTP request is received that contains an illegal header name or value (e.g. the header name is not a token) will the request be rejected (with a 400 response) or will the illegal header be ignored?- Returns:
true
if the request will be rejected orfalse
if the header will be ignored
-
setRejectIllegalHeaderName
@Deprecated public void setRejectIllegalHeaderName(boolean rejectIllegalHeaderName)
Deprecated.Now an alias forsetRejectIllegalHeader(boolean)
. Will be removed in Tomcat 10 onwards.If an HTTP request is received that contains an illegal header name or value (e.g. the header name is not a token) should the request be rejected (with a 400 response) or should the illegal header be ignored?- Parameters:
rejectIllegalHeaderName
-true
to reject requests with illegal header names or values,false
to ignore the header
-
getMaxSavePostSize
public int getMaxSavePostSize()
Return the maximum size of the post which will be saved during FORM or CLIENT-CERT authentication.- Returns:
- The size in bytes
-
setMaxSavePostSize
public void setMaxSavePostSize(int maxSavePostSize)
Set the maximum size of a POST which will be buffered during FORM or CLIENT-CERT authentication. When a POST is received where the security constraints require a client certificate, the POST body needs to be buffered while an SSL handshake takes place to obtain the certificate. A similar buffering is required during FORM auth.- Parameters:
maxSavePostSize
- The maximum size POST body to buffer in bytes
-
getMaxHttpHeaderSize
public int getMaxHttpHeaderSize()
-
setMaxHttpHeaderSize
public void setMaxHttpHeaderSize(int valueI)
-
getMaxHttpRequestHeaderSize
public int getMaxHttpRequestHeaderSize()
-
setMaxHttpRequestHeaderSize
public void setMaxHttpRequestHeaderSize(int valueI)
-
getMaxHttpResponseHeaderSize
public int getMaxHttpResponseHeaderSize()
-
setMaxHttpResponseHeaderSize
public void setMaxHttpResponseHeaderSize(int valueI)
-
getConnectionUploadTimeout
public int getConnectionUploadTimeout()
Specifies a different (usually longer) connection timeout during data upload. Default is 5 minutes as in Apache HTTPD server.- Returns:
- The timeout in milliseconds
-
setConnectionUploadTimeout
public void setConnectionUploadTimeout(int timeout)
Set the upload timeout.- Parameters:
timeout
- Upload timeout in milliseconds
-
getDisableUploadTimeout
public boolean getDisableUploadTimeout()
Get the flag that controls upload time-outs. If true, the connectionUploadTimeout will be ignored and the regular socket timeout will be used for the full duration of the connection.- Returns:
true
if the separate upload timeout is disabled
-
setDisableUploadTimeout
public void setDisableUploadTimeout(boolean isDisabled)
Set the flag to control whether a separate connection timeout is used during upload of a request body.- Parameters:
isDisabled
-true
if the separate upload timeout should be disabled
-
setCompression
public void setCompression(java.lang.String compression)
-
getCompression
public java.lang.String getCompression()
-
getCompressionLevel
protected int getCompressionLevel()
-
getNoCompressionUserAgents
public java.lang.String getNoCompressionUserAgents()
-
getNoCompressionUserAgentsPattern
protected java.util.regex.Pattern getNoCompressionUserAgentsPattern()
-
setNoCompressionUserAgents
public void setNoCompressionUserAgents(java.lang.String noCompressionUserAgents)
-
getCompressibleMimeType
public java.lang.String getCompressibleMimeType()
-
setCompressibleMimeType
public void setCompressibleMimeType(java.lang.String valueS)
-
getCompressibleMimeTypes
public java.lang.String[] getCompressibleMimeTypes()
-
getCompressionMinSize
public int getCompressionMinSize()
-
setCompressionMinSize
public void setCompressionMinSize(int compressionMinSize)
-
getNoCompressionStrongETag
@Deprecated public boolean getNoCompressionStrongETag()
Deprecated.
-
setNoCompressionStrongETag
@Deprecated public void setNoCompressionStrongETag(boolean noCompressionStrongETag)
Deprecated.
-
getRestrictedUserAgents
public java.lang.String getRestrictedUserAgents()
Get the string form of the regular expression that defines the User agents which should be restricted to HTTP/1.0 support.- Returns:
- The regular expression as a String
-
getRestrictedUserAgentsPattern
protected java.util.regex.Pattern getRestrictedUserAgentsPattern()
-
setRestrictedUserAgents
public void setRestrictedUserAgents(java.lang.String restrictedUserAgents)
Set restricted user agent list (which will downgrade the connector to HTTP/1.0 mode). Regular expression as supported byPattern
.- Parameters:
restrictedUserAgents
- The regular expression as supported byPattern
for the user agents e.g. "gorilla|desesplorer|tigrus"
-
getServer
public java.lang.String getServer()
-
setServer
public void setServer(java.lang.String server)
Set the server header name.- Parameters:
server
- The new value to use for the server header
-
getServerRemoveAppProvidedValues
public boolean getServerRemoveAppProvidedValues()
Should application provider values for the HTTP Server header be removed. Note that ifserver
is set, any application provided value will be over-ridden.- Returns:
true
if application provided values should be removed, otherwisefalse
-
setServerRemoveAppProvidedValues
public void setServerRemoveAppProvidedValues(boolean serverRemoveAppProvidedValues)
-
getMaxTrailerSize
public int getMaxTrailerSize()
-
setMaxTrailerSize
public void setMaxTrailerSize(int maxTrailerSize)
-
getMaxExtensionSize
public int getMaxExtensionSize()
-
setMaxExtensionSize
public void setMaxExtensionSize(int maxExtensionSize)
-
getMaxSwallowSize
public int getMaxSwallowSize()
-
setMaxSwallowSize
public void setMaxSwallowSize(int maxSwallowSize)
-
getSecure
public boolean getSecure()
-
setSecure
public void setSecure(boolean b)
-
setAllowedTrailerHeaders
public void setAllowedTrailerHeaders(java.lang.String commaSeparatedHeaders)
-
getAllowedTrailerHeadersInternal
protected java.util.Set<java.lang.String> getAllowedTrailerHeadersInternal()
-
getAllowedTrailerHeaders
public java.lang.String getAllowedTrailerHeaders()
-
addAllowedTrailerHeader
public void addAllowedTrailerHeader(java.lang.String header)
-
removeAllowedTrailerHeader
public void removeAllowedTrailerHeader(java.lang.String header)
-
addUpgradeProtocol
public void addUpgradeProtocol(UpgradeProtocol upgradeProtocol)
Description copied from interface:ProtocolHandler
Add a new protocol for used by HTTP/1.1 upgrade or ALPN.- Parameters:
upgradeProtocol
- the protocol
-
findUpgradeProtocols
public UpgradeProtocol[] findUpgradeProtocols()
Description copied from interface:ProtocolHandler
Return all configured upgrade protocols.- Returns:
- the protocols
-
getNegotiatedProtocol
public UpgradeProtocol getNegotiatedProtocol(java.lang.String negotiatedName)
Description copied from class:AbstractProtocol
Find a suitable handler for the protocol negotiated at the network layer.- Specified by:
getNegotiatedProtocol
in classAbstractProtocol<S>
- Parameters:
negotiatedName
- The name of the requested negotiated protocol.- Returns:
- The instance where
UpgradeProtocol.getAlpnName()
matches the requested protocol
-
getUpgradeProtocol
public UpgradeProtocol getUpgradeProtocol(java.lang.String upgradedName)
Description copied from class:AbstractProtocol
Find a suitable handler for the protocol upgraded name specified. This is used for direct connection protocol selection.- Specified by:
getUpgradeProtocol
in classAbstractProtocol<S>
- Parameters:
upgradedName
- The name of the requested negotiated protocol.- Returns:
- The instance where
UpgradeProtocol.getAlpnName()
matches the requested protocol
-
getUpgradeGroupInfo
public UpgradeGroupInfo getUpgradeGroupInfo(java.lang.String upgradeProtocol)
-
getONameForUpgrade
public javax.management.ObjectName getONameForUpgrade(java.lang.String upgradeProtocol)
-
isSSLEnabled
public boolean isSSLEnabled()
-
setSSLEnabled
public void setSSLEnabled(boolean SSLEnabled)
-
getUseSendfile
public boolean getUseSendfile()
-
setUseSendfile
public void setUseSendfile(boolean useSendfile)
-
getMaxKeepAliveRequests
public int getMaxKeepAliveRequests()
- Returns:
- The maximum number of requests which can be performed over a keep-alive connection. The default is the same as for Apache HTTP Server (100).
-
setMaxKeepAliveRequests
public void setMaxKeepAliveRequests(int mkar)
Set the maximum number of Keep-Alive requests to allow. This is to safeguard from DoS attacks. Setting to a negative value disables the limit.- Parameters:
mkar
- The new maximum number of Keep-Alive requests allowed
-
getDefaultSSLHostConfigName
public java.lang.String getDefaultSSLHostConfigName()
-
setDefaultSSLHostConfigName
public void setDefaultSSLHostConfigName(java.lang.String defaultSSLHostConfigName)
-
addSslHostConfig
public void addSslHostConfig(SSLHostConfig sslHostConfig)
Description copied from interface:ProtocolHandler
Add a new SSL configuration for a virtual host.- Parameters:
sslHostConfig
- the configuration
-
findSslHostConfigs
public SSLHostConfig[] findSslHostConfigs()
Description copied from interface:ProtocolHandler
Find all configured SSL virtual host configurations which will be used by SNI.- Returns:
- the configurations
-
reloadSslHostConfigs
public void reloadSslHostConfigs()
-
reloadSslHostConfig
public void reloadSslHostConfig(java.lang.String hostName)
-
getSslEnabledProtocols
public java.lang.String getSslEnabledProtocols()
-
setSslEnabledProtocols
public void setSslEnabledProtocols(java.lang.String enabledProtocols)
-
getSSLProtocol
public java.lang.String getSSLProtocol()
-
setSSLProtocol
public void setSSLProtocol(java.lang.String sslProtocol)
-
getKeystoreFile
public java.lang.String getKeystoreFile()
-
setKeystoreFile
public void setKeystoreFile(java.lang.String keystoreFile)
-
getSSLCertificateChainFile
public java.lang.String getSSLCertificateChainFile()
-
setSSLCertificateChainFile
public void setSSLCertificateChainFile(java.lang.String certificateChainFile)
-
getSSLCertificateFile
public java.lang.String getSSLCertificateFile()
-
setSSLCertificateFile
public void setSSLCertificateFile(java.lang.String certificateFile)
-
getSSLCertificateKeyFile
public java.lang.String getSSLCertificateKeyFile()
-
setSSLCertificateKeyFile
public void setSSLCertificateKeyFile(java.lang.String certificateKeyFile)
-
getAlgorithm
public java.lang.String getAlgorithm()
-
setAlgorithm
public void setAlgorithm(java.lang.String keyManagerAlgorithm)
-
getClientAuth
public java.lang.String getClientAuth()
-
setClientAuth
public void setClientAuth(java.lang.String certificateVerification)
-
getSSLVerifyClient
public java.lang.String getSSLVerifyClient()
-
setSSLVerifyClient
public void setSSLVerifyClient(java.lang.String certificateVerification)
-
getTrustMaxCertLength
public int getTrustMaxCertLength()
-
setTrustMaxCertLength
public void setTrustMaxCertLength(int certificateVerificationDepth)
-
getSSLVerifyDepth
public int getSSLVerifyDepth()
-
setSSLVerifyDepth
public void setSSLVerifyDepth(int certificateVerificationDepth)
-
getUseServerCipherSuitesOrder
public boolean getUseServerCipherSuitesOrder()
-
setUseServerCipherSuitesOrder
public void setUseServerCipherSuitesOrder(boolean honorCipherOrder)
-
getSSLHonorCipherOrder
public boolean getSSLHonorCipherOrder()
-
setSSLHonorCipherOrder
public void setSSLHonorCipherOrder(boolean honorCipherOrder)
-
getCiphers
public java.lang.String getCiphers()
-
setCiphers
public void setCiphers(java.lang.String ciphers)
-
getSSLCipherSuite
public java.lang.String getSSLCipherSuite()
-
setSSLCipherSuite
public void setSSLCipherSuite(java.lang.String ciphers)
-
getKeystorePass
public java.lang.String getKeystorePass()
-
setKeystorePass
public void setKeystorePass(java.lang.String certificateKeystorePassword)
-
getKeyPass
public java.lang.String getKeyPass()
-
setKeyPass
public void setKeyPass(java.lang.String certificateKeyPassword)
-
getSSLPassword
public java.lang.String getSSLPassword()
-
setSSLPassword
public void setSSLPassword(java.lang.String certificateKeyPassword)
-
getCrlFile
public java.lang.String getCrlFile()
-
setCrlFile
public void setCrlFile(java.lang.String certificateRevocationListFile)
-
getSSLCARevocationFile
public java.lang.String getSSLCARevocationFile()
-
setSSLCARevocationFile
public void setSSLCARevocationFile(java.lang.String certificateRevocationListFile)
-
getSSLCARevocationPath
public java.lang.String getSSLCARevocationPath()
-
setSSLCARevocationPath
public void setSSLCARevocationPath(java.lang.String certificateRevocationListPath)
-
getKeystoreType
public java.lang.String getKeystoreType()
-
setKeystoreType
public void setKeystoreType(java.lang.String certificateKeystoreType)
-
getKeystoreProvider
public java.lang.String getKeystoreProvider()
-
setKeystoreProvider
public void setKeystoreProvider(java.lang.String certificateKeystoreProvider)
-
getKeyAlias
public java.lang.String getKeyAlias()
-
setKeyAlias
public void setKeyAlias(java.lang.String certificateKeyAlias)
-
getTruststoreAlgorithm
public java.lang.String getTruststoreAlgorithm()
-
setTruststoreAlgorithm
public void setTruststoreAlgorithm(java.lang.String truststoreAlgorithm)
-
getTruststoreFile
public java.lang.String getTruststoreFile()
-
setTruststoreFile
public void setTruststoreFile(java.lang.String truststoreFile)
-
getTruststorePass
public java.lang.String getTruststorePass()
-
setTruststorePass
public void setTruststorePass(java.lang.String truststorePassword)
-
getTruststoreType
public java.lang.String getTruststoreType()
-
setTruststoreType
public void setTruststoreType(java.lang.String truststoreType)
-
getTruststoreProvider
public java.lang.String getTruststoreProvider()
-
setTruststoreProvider
public void setTruststoreProvider(java.lang.String truststoreProvider)
-
getSslProtocol
public java.lang.String getSslProtocol()
-
setSslProtocol
public void setSslProtocol(java.lang.String sslProtocol)
-
getSessionCacheSize
public int getSessionCacheSize()
-
setSessionCacheSize
public void setSessionCacheSize(int sessionCacheSize)
-
getSessionTimeout
public int getSessionTimeout()
-
setSessionTimeout
public void setSessionTimeout(int sessionTimeout)
-
getSSLCACertificatePath
public java.lang.String getSSLCACertificatePath()
-
setSSLCACertificatePath
public void setSSLCACertificatePath(java.lang.String caCertificatePath)
-
getSSLCACertificateFile
public java.lang.String getSSLCACertificateFile()
-
setSSLCACertificateFile
public void setSSLCACertificateFile(java.lang.String caCertificateFile)
-
getSSLDisableCompression
public boolean getSSLDisableCompression()
-
setSSLDisableCompression
public void setSSLDisableCompression(boolean disableCompression)
-
getSSLDisableSessionTickets
public boolean getSSLDisableSessionTickets()
-
setSSLDisableSessionTickets
public void setSSLDisableSessionTickets(boolean disableSessionTickets)
-
getTrustManagerClassName
public java.lang.String getTrustManagerClassName()
-
setTrustManagerClassName
public void setTrustManagerClassName(java.lang.String trustManagerClassName)
-
createProcessor
protected Processor createProcessor()
Description copied from class:AbstractProtocol
Create and configure a new Processor instance for the current protocol implementation.- Specified by:
createProcessor
in classAbstractProtocol<S>
- Returns:
- A fully configured Processor instance that is ready to use
-
createUpgradeProcessor
protected Processor createUpgradeProcessor(SocketWrapperBase<?> socket, UpgradeToken upgradeToken)
- Specified by:
createUpgradeProcessor
in classAbstractProtocol<S>
-
-