public abstract class AbstractHttp11Protocol<S> extends AbstractProtocol<S>
AbstractProtocol.AsyncTimeout, AbstractProtocol.ConnectionHandler<S>, AbstractProtocol.RecycledProcessors
Modifier and Type | Field and Description |
---|---|
protected static StringManager |
sm |
adapter, domain, mserver, oname, processorCache, rgOname, tpOname
Constructor and Description |
---|
AbstractHttp11Protocol(AbstractEndpoint<S,?> endpoint) |
Modifier and Type | Method and Description |
---|---|
void |
addAllowedTrailerHeader(String header) |
void |
addSslHostConfig(SSLHostConfig sslHostConfig) |
void |
addUpgradeProtocol(UpgradeProtocol upgradeProtocol) |
protected Processor |
createProcessor()
Create and configure a new Processor instance for the current protocol
implementation.
|
protected Processor |
createUpgradeProcessor(SocketWrapperBase<?> socket,
UpgradeToken upgradeToken) |
SSLHostConfig[] |
findSslHostConfigs() |
UpgradeProtocol[] |
findUpgradeProtocols() |
String |
getAlgorithm() |
String |
getAllowedTrailerHeaders() |
protected Set<String> |
getAllowedTrailerHeadersInternal() |
String |
getCiphers() |
String |
getClientAuth() |
String |
getCompressibleMimeType() |
String[] |
getCompressibleMimeTypes() |
String |
getCompression()
Return compression level.
|
protected int |
getCompressionLevel() |
int |
getCompressionMinSize() |
int |
getConnectionUploadTimeout()
Specifies a different (usually longer) connection timeout during data
upload.
|
String |
getCrlFile() |
String |
getDefaultSSLHostConfigName() |
boolean |
getDisableUploadTimeout()
Get the flag that controls upload time-outs.
|
protected AbstractEndpoint<S,?> |
getEndpoint()
Over-ridden here to make the method visible to nested classes.
|
String |
getKeyAlias() |
String |
getKeyPass() |
String |
getKeystoreFile() |
String |
getKeystorePass() |
String |
getKeystoreProvider() |
String |
getKeystoreType() |
int |
getMaxExtensionSize() |
int |
getMaxHttpHeaderSize() |
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(String negotiatedName)
Find a suitable handler for the protocol negotiated
at the network layer.
|
String |
getNoCompressionUserAgents()
Obtain the String form of the regular expression that defines the user
agents to not use gzip with.
|
protected Pattern |
getNoCompressionUserAgentsPattern() |
protected String |
getProtocolName()
Obtain the name of the protocol, (Http, Ajp, etc.).
|
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 Pattern |
getRestrictedUserAgentsPattern() |
boolean |
getSecure() |
String |
getServer() |
boolean |
getServerRemoveAppProvidedValues()
Should application provider values for the HTTP Server header be removed.
|
int |
getSessionCacheSize() |
int |
getSessionTimeout() |
String |
getSSLCACertificateFile() |
String |
getSSLCACertificatePath() |
String |
getSSLCARevocationFile() |
String |
getSSLCARevocationPath() |
String |
getSSLCertificateChainFile() |
String |
getSSLCertificateFile() |
String |
getSSLCertificateKeyFile() |
String |
getSSLCipherSuite() |
boolean |
getSSLDisableCompression() |
boolean |
getSSLDisableSessionTickets() |
String |
getSslEnabledProtocols() |
boolean |
getSSLHonorCipherOrder() |
String |
getSSLPassword() |
String |
getSslProtocol() |
String |
getSSLProtocol() |
String |
getSSLVerifyClient() |
int |
getSSLVerifyDepth() |
String |
getTrustManagerClassName() |
int |
getTrustMaxCertLength() |
String |
getTruststoreAlgorithm() |
String |
getTruststoreFile() |
String |
getTruststorePass() |
String |
getTruststoreProvider() |
String |
getTruststoreType() |
UpgradeProtocol |
getUpgradeProtocol(String upgradedName)
Find a suitable handler for the protocol upgraded name specified.
|
boolean |
getUseSendfile() |
boolean |
getUseServerCipherSuitesOrder() |
void |
init()
Initialise the protocol.
|
boolean |
isSSLEnabled() |
void |
removeAllowedTrailerHeader(String header) |
void |
setAlgorithm(String keyManagerAlgorithm) |
void |
setAllowedTrailerHeaders(String commaSeparatedHeaders) |
void |
setCiphers(String ciphers) |
void |
setClientAuth(String certificateVerification) |
void |
setCompressibleMimeType(String valueS) |
void |
setCompression(String compression)
Set compression level.
|
void |
setCompressionMinSize(int compressionMinSize)
Set Minimum size to trigger compression.
|
void |
setConnectionUploadTimeout(int timeout)
Set the upload timeout.
|
void |
setCrlFile(String certificateRevocationListFile) |
void |
setDefaultSSLHostConfigName(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(String certificateKeyAlias) |
void |
setKeyPass(String certificateKeyPassword) |
void |
setKeystoreFile(String keystoreFile) |
void |
setKeystorePass(String certificateKeystorePassword) |
void |
setKeystoreProvider(String certificateKeystoreProvider) |
void |
setKeystoreType(String certificateKeystoreType) |
void |
setMaxExtensionSize(int maxExtensionSize) |
void |
setMaxHttpHeaderSize(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 |
setNoCompressionUserAgents(String noCompressionUserAgents)
Set no compression user agent pattern.
|
void |
setRestrictedUserAgents(String restrictedUserAgents)
Set restricted user agent list (which will downgrade the connector
to HTTP/1.0 mode).
|
void |
setSecure(boolean b) |
void |
setServer(String server)
Set the server header name.
|
void |
setServerRemoveAppProvidedValues(boolean serverRemoveAppProvidedValues) |
void |
setSessionCacheSize(int sessionCacheSize) |
void |
setSessionTimeout(int sessionTimeout) |
void |
setSSLCACertificateFile(String caCertificateFile) |
void |
setSSLCACertificatePath(String caCertificatePath) |
void |
setSSLCARevocationFile(String certificateRevocationListFile) |
void |
setSSLCARevocationPath(String certificateRevocationListPath) |
void |
setSSLCertificateChainFile(String certificateChainFile) |
void |
setSSLCertificateFile(String certificateFile) |
void |
setSSLCertificateKeyFile(String certificateKeyFile) |
void |
setSSLCipherSuite(String ciphers) |
void |
setSSLDisableCompression(boolean disableCompression) |
void |
setSSLDisableSessionTickets(boolean disableSessionTickets) |
void |
setSSLEnabled(boolean SSLEnabled) |
void |
setSslEnabledProtocols(String enabledProtocols) |
void |
setSSLHonorCipherOrder(boolean honorCipherOrder) |
void |
setSSLPassword(String certificateKeyPassword) |
void |
setSslProtocol(String sslProtocol) |
void |
setSSLProtocol(String sslProtocol) |
void |
setSSLVerifyClient(String certificateVerification) |
void |
setSSLVerifyDepth(int certificateVerificationDepth) |
void |
setTrustManagerClassName(String trustManagerClassName) |
void |
setTrustMaxCertLength(int certificateVerificationDepth) |
void |
setTruststoreAlgorithm(String truststoreAlgorithm) |
void |
setTruststoreFile(String truststoreFile) |
void |
setTruststorePass(String truststorePassword) |
void |
setTruststoreProvider(String truststoreProvider) |
void |
setTruststoreType(String truststoreType) |
void |
setUseSendfile(boolean useSendfile) |
void |
setUseServerCipherSuitesOrder(boolean honorCipherOrder) |
addWaitingProcessor, destroy, getAcceptCount, getAcceptorThreadCount, getAcceptorThreadPriority, getAdapter, getAddress, getAsyncTimeout, getClientCertProvider, getConnectionCount, getConnectionLinger, getConnectionTimeout, getDomain, getExecutor, getHandler, getKeepAliveTimeout, getLocalPort, getLog, getMaxConnections, getMaxHeaderCount, getMaxThreads, getMinSpareThreads, getName, getNameIndex, getNamePrefix, getObjectName, getPort, getProcessorCache, getProperty, getTcpNoDelay, getThreadPriority, 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, setProcessorCache, setProperty, setTcpNoDelay, setThreadPriority, start, stop
protected static final StringManager sm
public AbstractHttp11Protocol(AbstractEndpoint<S,?> endpoint)
public void init() throws Exception
ProtocolHandler
init
in interface ProtocolHandler
init
in class AbstractProtocol<S>
Exception
- If the protocol handler fails to initialiseprotected String getProtocolName()
AbstractProtocol
getProtocolName
in class AbstractProtocol<S>
protected AbstractEndpoint<S,?> getEndpoint()
Over-ridden here to make the method visible to nested classes.
getEndpoint
in class AbstractProtocol<S>
public int getMaxSavePostSize()
public void setMaxSavePostSize(int maxSavePostSize)
maxSavePostSize
- The maximum size POST body to buffer in bytespublic int getMaxHttpHeaderSize()
public void setMaxHttpHeaderSize(int valueI)
public int getConnectionUploadTimeout()
public void setConnectionUploadTimeout(int timeout)
timeout
- Upload timeout in millisecondspublic boolean getDisableUploadTimeout()
true
if the separate upload timeout is disabledpublic void setDisableUploadTimeout(boolean isDisabled)
isDisabled
- true
if the separate upload timeout should be
disabledpublic void setCompression(String compression)
compression
- One of on
, force
,
off
or the minimum compression size in
bytes which implies on
public String getCompression()
protected int getCompressionLevel()
public String getNoCompressionUserAgents()
protected Pattern getNoCompressionUserAgentsPattern()
public void setNoCompressionUserAgents(String noCompressionUserAgents)
Pattern
. e.g.: gorilla|desesplorer|tigrus
.noCompressionUserAgents
- The regular expression for user agent
strings for which compression should not
be appliedpublic String getCompressibleMimeType()
public void setCompressibleMimeType(String valueS)
public String[] getCompressibleMimeTypes()
public int getCompressionMinSize()
public void setCompressionMinSize(int compressionMinSize)
compressionMinSize
- The minimum content length required for
compression in bytespublic String getRestrictedUserAgents()
protected Pattern getRestrictedUserAgentsPattern()
public void setRestrictedUserAgents(String restrictedUserAgents)
Pattern
.restrictedUserAgents
- The regular expression as supported by
Pattern
for the user agents e.g.
"gorilla|desesplorer|tigrus"public String getServer()
public void setServer(String server)
server
- The new value to use for the server headerpublic boolean getServerRemoveAppProvidedValues()
server
is set, any application provided value will
be over-ridden.true
if application provided values should be removed,
otherwise false
public void setServerRemoveAppProvidedValues(boolean serverRemoveAppProvidedValues)
public int getMaxTrailerSize()
public void setMaxTrailerSize(int maxTrailerSize)
public int getMaxExtensionSize()
public void setMaxExtensionSize(int maxExtensionSize)
public int getMaxSwallowSize()
public void setMaxSwallowSize(int maxSwallowSize)
public boolean getSecure()
public void setSecure(boolean b)
public void setAllowedTrailerHeaders(String commaSeparatedHeaders)
public String getAllowedTrailerHeaders()
public void addAllowedTrailerHeader(String header)
public void removeAllowedTrailerHeader(String header)
public void addUpgradeProtocol(UpgradeProtocol upgradeProtocol)
public UpgradeProtocol[] findUpgradeProtocols()
public UpgradeProtocol getNegotiatedProtocol(String negotiatedName)
AbstractProtocol
getNegotiatedProtocol
in class AbstractProtocol<S>
negotiatedName
- The name of the requested negotiated protocol.UpgradeProtocol.getAlpnName()
matches
the requested protocolpublic UpgradeProtocol getUpgradeProtocol(String upgradedName)
AbstractProtocol
getUpgradeProtocol
in class AbstractProtocol<S>
upgradedName
- The name of the requested negotiated protocol.UpgradeProtocol.getAlpnName()
matches
the requested protocolpublic boolean isSSLEnabled()
public void setSSLEnabled(boolean SSLEnabled)
public boolean getUseSendfile()
public void setUseSendfile(boolean useSendfile)
public int getMaxKeepAliveRequests()
public void setMaxKeepAliveRequests(int mkar)
mkar
- The new maximum number of Keep-Alive requests allowedpublic String getDefaultSSLHostConfigName()
public void setDefaultSSLHostConfigName(String defaultSSLHostConfigName)
public void addSslHostConfig(SSLHostConfig sslHostConfig)
public SSLHostConfig[] findSslHostConfigs()
public String getSslEnabledProtocols()
public void setSslEnabledProtocols(String enabledProtocols)
public String getSSLProtocol()
public void setSSLProtocol(String sslProtocol)
public String getKeystoreFile()
public void setKeystoreFile(String keystoreFile)
public String getSSLCertificateChainFile()
public void setSSLCertificateChainFile(String certificateChainFile)
public String getSSLCertificateFile()
public void setSSLCertificateFile(String certificateFile)
public String getSSLCertificateKeyFile()
public void setSSLCertificateKeyFile(String certificateKeyFile)
public String getAlgorithm()
public void setAlgorithm(String keyManagerAlgorithm)
public String getClientAuth()
public void setClientAuth(String certificateVerification)
public String getSSLVerifyClient()
public void setSSLVerifyClient(String certificateVerification)
public int getTrustMaxCertLength()
public void setTrustMaxCertLength(int certificateVerificationDepth)
public int getSSLVerifyDepth()
public void setSSLVerifyDepth(int certificateVerificationDepth)
public boolean getUseServerCipherSuitesOrder()
public void setUseServerCipherSuitesOrder(boolean honorCipherOrder)
public boolean getSSLHonorCipherOrder()
public void setSSLHonorCipherOrder(boolean honorCipherOrder)
public String getCiphers()
public void setCiphers(String ciphers)
public String getSSLCipherSuite()
public void setSSLCipherSuite(String ciphers)
public String getKeystorePass()
public void setKeystorePass(String certificateKeystorePassword)
public String getKeyPass()
public void setKeyPass(String certificateKeyPassword)
public String getSSLPassword()
public void setSSLPassword(String certificateKeyPassword)
public String getCrlFile()
public void setCrlFile(String certificateRevocationListFile)
public String getSSLCARevocationFile()
public void setSSLCARevocationFile(String certificateRevocationListFile)
public String getSSLCARevocationPath()
public void setSSLCARevocationPath(String certificateRevocationListPath)
public String getKeystoreType()
public void setKeystoreType(String certificateKeystoreType)
public String getKeystoreProvider()
public void setKeystoreProvider(String certificateKeystoreProvider)
public String getKeyAlias()
public void setKeyAlias(String certificateKeyAlias)
public String getTruststoreAlgorithm()
public void setTruststoreAlgorithm(String truststoreAlgorithm)
public String getTruststoreFile()
public void setTruststoreFile(String truststoreFile)
public String getTruststorePass()
public void setTruststorePass(String truststorePassword)
public String getTruststoreType()
public void setTruststoreType(String truststoreType)
public String getTruststoreProvider()
public void setTruststoreProvider(String truststoreProvider)
public String getSslProtocol()
public void setSslProtocol(String sslProtocol)
public int getSessionCacheSize()
public void setSessionCacheSize(int sessionCacheSize)
public int getSessionTimeout()
public void setSessionTimeout(int sessionTimeout)
public String getSSLCACertificatePath()
public void setSSLCACertificatePath(String caCertificatePath)
public String getSSLCACertificateFile()
public void setSSLCACertificateFile(String caCertificateFile)
public boolean getSSLDisableCompression()
public void setSSLDisableCompression(boolean disableCompression)
public boolean getSSLDisableSessionTickets()
public void setSSLDisableSessionTickets(boolean disableSessionTickets)
public String getTrustManagerClassName()
public void setTrustManagerClassName(String trustManagerClassName)
protected Processor createProcessor()
AbstractProtocol
createProcessor
in class AbstractProtocol<S>
protected Processor createUpgradeProcessor(SocketWrapperBase<?> socket, UpgradeToken upgradeToken)
createUpgradeProcessor
in class AbstractProtocol<S>
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.