AbstractHttp11Protocol (Apache Tomcat 8.5.12 API Documentation)

org.apache.coyote.http11

## Class AbstractHttp11Protocol<S>

- java.lang.Object
- - org.apache.coyote.AbstractProtocol<S>
  - - org.apache.coyote.http11.AbstractHttp11Protocol<S>

- All Implemented Interfaces:
    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.AsyncTimeout, AbstractProtocol.ConnectionHandler<S>, AbstractProtocol.RecycledProcessors`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static StringManager` | `sm`

    - ### Fields inherited from class org.apache.coyote.AbstractProtocol

      `adapter, clientCertProvider, domain, mserver, oname, processorCache, rgOname, tpOname`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractHttp11Protocol(AbstractEndpoint<S> endpoint)`

  - ### Method Summary

    Methods
    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()`
    `String` | `getCompressableMimeType()`
    `String[]` | `getCompressableMimeTypes()`
    `String` | `getCompression()`
    `int` | `getCompressionMinSize()`
    `int` | `getConnectionUploadTimeout()`
    `String` | `getDefaultSSLHostConfigName()`
    `boolean` | `getDisableUploadTimeout()`
    `protected AbstractEndpoint<S>` | `getEndpoint()` Over-ridden here to make the method visible to nested classes.
    `int` | `getMaxExtensionSize()`
    `int` | `getMaxHttpHeaderSize()`
    `int` | `getMaxKeepAliveRequests()`
    `int` | `getMaxSavePostSize()`
    `int` | `getMaxSwallowSize()`
    `int` | `getMaxTrailerSize()`
    `UpgradeProtocol` | `getNegotiatedProtocol(String negotiatedName)` Find a suitable handler for the protocol negotiated at the network layer.
    `String` | `getNoCompressionUserAgents()`
    `protected String` | `getProtocolName()` Obtain the name of the protocol, (Http, Ajp, etc.).
    `String` | `getRestrictedUserAgents()`
    `boolean` | `getSecure()`
    `String` | `getServer()`
    `boolean` | `getServerRemoveAppProvidedValues()`
    `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 valueS)`
    `void` | `setCompressionMinSize(int valueI)`
    `void` | `setConnectionUploadTimeout(int i)`
    `void` | `setCrlFile(String certificateRevocationListFile)`
    `void` | `setDefaultSSLHostConfigName(String defaultSSLHostConfigName)`
    `void` | `setDisableUploadTimeout(boolean isDisabled)`
    `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)`
    `void` | `setMaxSavePostSize(int valueI)`
    `void` | `setMaxSwallowSize(int maxSwallowSize)`
    `void` | `setMaxTrailerSize(int maxTrailerSize)`
    `void` | `setNoCompressionUserAgents(String valueS)`
    `void` | `setRestrictedUserAgents(String valueS)`
    `void` | `setSecure(boolean b)`
    `void` | `setServer(String server)`
    `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(String 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(String honorCipherOrder)`

    - ### Methods inherited from class org.apache.coyote.AbstractProtocol

      `addWaitingProcessor, destroy, getAcceptorThreadCount, getAcceptorThreadPriority, getAdapter, getAddress, getAsyncTimeout, getBacklog, getClientCertProvider, getConnectionCount, getConnectionTimeout, getDomain, getExecutor, getHandler, getKeepAliveTimeout, getLocalPort, getLog, getMaxConnections, getMaxHeaderCount, getMaxThreads, getMinSpareThreads, getName, getNameIndex, getNamePrefix, getObjectName, getPort, getProcessorCache, getProperty, getSoLinger, getSoTimeout, getTcpNoDelay, getThreadPriority, isAprRequired, isSendfileSupported, pause, postDeregister, postRegister, preDeregister, preRegister, removeWaitingProcessor, resume, setAcceptorThreadCount, setAcceptorThreadPriority, setAdapter, setAddress, setBacklog, setClientCertProvider, setConnectionTimeout, setExecutor, setHandler, setKeepAliveTimeout, setMaxConnections, setMaxHeaderCount, setMaxThreads, setMinSpareThreads, setPort, setProcessorCache, setProperty, setSoLinger, setSoTimeout, setTcpNoDelay, setThreadPriority, start, stop`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### sm

          protected static final StringManager sm

  - ### Constructor Detail

    - #### AbstractHttp11Protocol

          public AbstractHttp11Protocol(AbstractEndpoint<S> endpoint)

  - ### Method Detail

    - #### init

          public void init()
                    throws Exception

      Description copied from interface: `ProtocolHandler`
      Initialise the protocol.
      Specified by:
        `init` in interface `ProtocolHandler`
      Overrides:
        `init` in class `AbstractProtocol<S>`
      Throws:
        `Exception` - If the protocol handler fails to initialise

    - #### getProtocolName

          protected String getProtocolName()

      Description copied from class: `AbstractProtocol`
      Obtain the name of the protocol, (Http, Ajp, etc.). Used with JMX.
      Specified by:
        `getProtocolName` in class `AbstractProtocol<S>`
      Returns:
        the protocol name

    - #### getEndpoint

          protected AbstractEndpoint<S> getEndpoint()

      Over-ridden here to make the method visible to nested classes.

      Overrides:
        `getEndpoint` in class `AbstractProtocol<S>`

    - #### getMaxSavePostSize

          public int getMaxSavePostSize()

    - #### setMaxSavePostSize

          public void setMaxSavePostSize(int valueI)

    - #### getMaxHttpHeaderSize

          public int getMaxHttpHeaderSize()

    - #### setMaxHttpHeaderSize

          public void setMaxHttpHeaderSize(int valueI)

    - #### getConnectionUploadTimeout

          public int getConnectionUploadTimeout()

    - #### setConnectionUploadTimeout

          public void setConnectionUploadTimeout(int i)

    - #### getDisableUploadTimeout

          public boolean getDisableUploadTimeout()

    - #### setDisableUploadTimeout

          public void setDisableUploadTimeout(boolean isDisabled)

    - #### getCompression

          public String getCompression()

    - #### setCompression

          public void setCompression(String valueS)

    - #### getNoCompressionUserAgents

          public String getNoCompressionUserAgents()

    - #### setNoCompressionUserAgents

          public void setNoCompressionUserAgents(String valueS)

    - #### getCompressableMimeType

          public String getCompressableMimeType()

    - #### setCompressableMimeType

          public void setCompressableMimeType(String valueS)

    - #### getCompressableMimeTypes

          public String[] getCompressableMimeTypes()

    - #### getCompressionMinSize

          public int getCompressionMinSize()

    - #### setCompressionMinSize

          public void setCompressionMinSize(int valueI)

    - #### getRestrictedUserAgents

          public String getRestrictedUserAgents()

    - #### setRestrictedUserAgents

          public void setRestrictedUserAgents(String valueS)

    - #### getServer

          public String getServer()

    - #### setServer

          public void setServer(String server)

    - #### getServerRemoveAppProvidedValues

          public boolean getServerRemoveAppProvidedValues()

    - #### 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(String commaSeparatedHeaders)

    - #### getAllowedTrailerHeaders

          public String getAllowedTrailerHeaders()

    - #### addAllowedTrailerHeader

          public void addAllowedTrailerHeader(String header)

    - #### removeAllowedTrailerHeader

          public void removeAllowedTrailerHeader(String header)

    - #### addUpgradeProtocol

          public void addUpgradeProtocol(UpgradeProtocol upgradeProtocol)

    - #### findUpgradeProtocols

          public UpgradeProtocol[] findUpgradeProtocols()

    - #### getNegotiatedProtocol

          public UpgradeProtocol getNegotiatedProtocol(String negotiatedName)

      Description copied from class: `AbstractProtocol`
      Find a suitable handler for the protocol negotiated at the network layer.
      Specified by:
        `getNegotiatedProtocol` in class `AbstractProtocol<S>`
      Parameters:
        `negotiatedName` - The name of the requested negotiated protocol.
      Returns:
        The instance where `UpgradeProtocol.getAlpnName()` matches the requested protocol

    - #### getUpgradeProtocol

          public UpgradeProtocol getUpgradeProtocol(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 class `AbstractProtocol<S>`
      Parameters:
        `upgradedName` - The name of the requested negotiated protocol.
      Returns:
        The instance where `UpgradeProtocol.getAlpnName()` matches the requested protocol

    - #### 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)

    - #### getDefaultSSLHostConfigName

          public String getDefaultSSLHostConfigName()

    - #### setDefaultSSLHostConfigName

          public void setDefaultSSLHostConfigName(String defaultSSLHostConfigName)

    - #### addSslHostConfig

          public void addSslHostConfig(SSLHostConfig sslHostConfig)

    - #### findSslHostConfigs

          public SSLHostConfig[] findSslHostConfigs()

    - #### setSslEnabledProtocols

          public void setSslEnabledProtocols(String enabledProtocols)

    - #### setSSLProtocol

          public void setSSLProtocol(String sslProtocol)

    - #### setKeystoreFile

          public void setKeystoreFile(String keystoreFile)

    - #### setSSLCertificateChainFile

          public void setSSLCertificateChainFile(String certificateChainFile)

    - #### setSSLCertificateFile

          public void setSSLCertificateFile(String certificateFile)

    - #### setSSLCertificateKeyFile

          public void setSSLCertificateKeyFile(String certificateKeyFile)

    - #### setAlgorithm

          public void setAlgorithm(String keyManagerAlgorithm)

    - #### setClientAuth

          public void setClientAuth(String certificateVerification)

    - #### setSSLVerifyClient

          public void setSSLVerifyClient(String certificateVerification)

    - #### setTrustMaxCertLength

          public void setTrustMaxCertLength(int certificateVerificationDepth)

    - #### setSSLVerifyDepth

          public void setSSLVerifyDepth(int certificateVerificationDepth)

    - #### setUseServerCipherSuitesOrder

          public void setUseServerCipherSuitesOrder(String honorCipherOrder)

    - #### setSSLHonorCipherOrder

          public void setSSLHonorCipherOrder(String honorCipherOrder)

    - #### setCiphers

          public void setCiphers(String ciphers)

    - #### setSSLCipherSuite

          public void setSSLCipherSuite(String ciphers)

    - #### setKeystorePass

          public void setKeystorePass(String certificateKeystorePassword)

    - #### setKeyPass

          public void setKeyPass(String certificateKeyPassword)

    - #### setSSLPassword

          public void setSSLPassword(String certificateKeyPassword)

    - #### setCrlFile

          public void setCrlFile(String certificateRevocationListFile)

    - #### setSSLCARevocationFile

          public void setSSLCARevocationFile(String certificateRevocationListFile)

    - #### setSSLCARevocationPath

          public void setSSLCARevocationPath(String certificateRevocationListPath)

    - #### setKeystoreType

          public void setKeystoreType(String certificateKeystoreType)

    - #### setKeystoreProvider

          public void setKeystoreProvider(String certificateKeystoreProvider)

    - #### setKeyAlias

          public void setKeyAlias(String certificateKeyAlias)

    - #### setTruststoreAlgorithm

          public void setTruststoreAlgorithm(String truststoreAlgorithm)

    - #### setTruststoreFile

          public void setTruststoreFile(String truststoreFile)

    - #### setTruststorePass

          public void setTruststorePass(String truststorePassword)

    - #### setTruststoreType

          public void setTruststoreType(String truststoreType)

    - #### setTruststoreProvider

          public void setTruststoreProvider(String truststoreProvider)

    - #### setSslProtocol

          public void setSslProtocol(String sslProtocol)

    - #### setSessionCacheSize

          public void setSessionCacheSize(int sessionCacheSize)

    - #### setSessionTimeout

          public void setSessionTimeout(int sessionTimeout)

    - #### setSSLCACertificatePath

          public void setSSLCACertificatePath(String caCertificatePath)

    - #### setSSLCACertificateFile

          public void setSSLCACertificateFile(String caCertificateFile)

    - #### setSSLDisableCompression

          public void setSSLDisableCompression(boolean disableCompression)

    - #### setSSLDisableSessionTickets

          public void setSSLDisableSessionTickets(boolean disableSessionTickets)

    - #### setTrustManagerClassName

          public void setTrustManagerClassName(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 class `AbstractProtocol<S>`
      Returns:
        A fully configured Processor instance that is ready to use

    - #### createUpgradeProcessor

          protected Processor createUpgradeProcessor(SocketWrapperBase<?> socket,
                                         UpgradeToken upgradeToken)

      Specified by:
        `createUpgradeProcessor` in class `AbstractProtocol<S>`

Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.