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 |
getAllowedTrailerHeaders() |
protected Set<String> |
getAllowedTrailerHeadersInternal() |
String |
getCompressableMimeType() |
String[] |
getCompressableMimeTypes() |
String |
getCompression()
Return compression level.
|
protected int |
getCompressionLevel() |
int |
getCompressionMinSize() |
int |
getConnectionUploadTimeout()
Specifies a different (usually longer) connection timeout during data
upload.
|
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.
|
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.
|
UpgradeProtocol |
getUpgradeProtocol(String upgradedName)
Find a suitable handler for the protocol upgraded name specified.
|
boolean |
getUseSendfile() |
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 |
setCompressableMimeType(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 getCompressableMimeType()
public void setCompressableMimeType(String valueS)
public String[] getCompressableMimeTypes()
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 void setSslEnabledProtocols(String enabledProtocols)
public void setSSLProtocol(String sslProtocol)
public void setKeystoreFile(String keystoreFile)
public void setSSLCertificateChainFile(String certificateChainFile)
public void setSSLCertificateFile(String certificateFile)
public void setSSLCertificateKeyFile(String certificateKeyFile)
public void setAlgorithm(String keyManagerAlgorithm)
public void setClientAuth(String certificateVerification)
public void setSSLVerifyClient(String certificateVerification)
public void setTrustMaxCertLength(int certificateVerificationDepth)
public void setSSLVerifyDepth(int certificateVerificationDepth)
public void setUseServerCipherSuitesOrder(boolean honorCipherOrder)
public void setSSLHonorCipherOrder(boolean honorCipherOrder)
public void setCiphers(String ciphers)
public void setSSLCipherSuite(String ciphers)
public void setKeystorePass(String certificateKeystorePassword)
public void setKeyPass(String certificateKeyPassword)
public void setSSLPassword(String certificateKeyPassword)
public void setCrlFile(String certificateRevocationListFile)
public void setSSLCARevocationFile(String certificateRevocationListFile)
public void setSSLCARevocationPath(String certificateRevocationListPath)
public void setKeystoreType(String certificateKeystoreType)
public void setKeystoreProvider(String certificateKeystoreProvider)
public void setKeyAlias(String certificateKeyAlias)
public void setTruststoreAlgorithm(String truststoreAlgorithm)
public void setTruststoreFile(String truststoreFile)
public void setTruststorePass(String truststorePassword)
public void setTruststoreType(String truststoreType)
public void setTruststoreProvider(String truststoreProvider)
public void setSslProtocol(String sslProtocol)
public void setSessionCacheSize(int sessionCacheSize)
public void setSessionTimeout(int sessionTimeout)
public void setSSLCACertificatePath(String caCertificatePath)
public void setSSLCACertificateFile(String caCertificateFile)
public void setSSLDisableCompression(boolean disableCompression)
public void setSSLDisableSessionTickets(boolean disableSessionTickets)
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.