Package org.apache.coyote.http2
Class Http2Protocol
- java.lang.Object
- 
- org.apache.coyote.http2.Http2Protocol
 
- 
- All Implemented Interfaces:
- UpgradeProtocol
 
 public class Http2Protocol extends java.lang.Object implements UpgradeProtocol 
- 
- 
Constructor SummaryConstructors Constructor Description Http2Protocol()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanaccept(Request request)Allows the implementation to examine the request and accept or reject it based on what it finds.java.lang.StringgetAllowedTrailerHeaders()byte[]getAlpnIdentifier()java.lang.StringgetAlpnName()java.lang.StringgetCompressibleMimeType()java.lang.String[]getCompressibleMimeTypes()java.lang.StringgetCompression()protected intgetCompressionLevel()intgetCompressionMinSize()ContinueResponseTiminggetContinueResponseTimingInternal()RequestGroupInfogetGlobal()AbstractProtocol<?>getHttp11Protocol()java.lang.StringgetHttpUpgradeName(boolean isSSLEnabled)intgetInitialWindowSize()booleangetInitiatePingDisabled()InternalHttpUpgradeHandlergetInternalUpgradeHandler(SocketWrapperBase<?> socketWrapper, Adapter adapter, Request coyoteRequest)longgetKeepAliveTimeout()intgetMaxConcurrentStreamExecution()longgetMaxConcurrentStreams()intgetMaxHeaderCount()intgetMaxHeaderSize()intgetMaxTrailerCount()intgetMaxTrailerSize()booleangetNoCompressionStrongETag()Deprecated.java.lang.StringgetNoCompressionUserAgents()protected java.util.regex.PatterngetNoCompressionUserAgentsPattern()intgetOverheadContinuationThreshold()intgetOverheadCountFactor()intgetOverheadDataThreshold()intgetOverheadWindowUpdateThreshold()ProcessorgetProcessor(SocketWrapperBase<?> socketWrapper, Adapter adapter)longgetReadTimeout()longgetStreamReadTimeout()longgetStreamWriteTimeout()java.lang.StringgetUpgradeProtocolName()booleangetUseSendfile()longgetWriteTimeout()voidsetAllowedTrailerHeaders(java.lang.String commaSeparatedHeaders)voidsetCompressibleMimeType(java.lang.String valueS)voidsetCompression(java.lang.String compression)voidsetCompressionMinSize(int compressionMinSize)voidsetHttp11Protocol(AbstractHttp11Protocol<?> http11Protocol)Configure the HTTP/1.1 protocol that this UpgradeProcotol is nested under.voidsetInitialWindowSize(int initialWindowSize)voidsetInitiatePingDisabled(boolean initiatePingDisabled)voidsetKeepAliveTimeout(long keepAliveTimeout)voidsetMaxConcurrentStreamExecution(int maxConcurrentStreamExecution)voidsetMaxConcurrentStreams(long maxConcurrentStreams)voidsetMaxHeaderCount(int maxHeaderCount)voidsetMaxHeaderSize(int maxHeaderSize)voidsetMaxTrailerCount(int maxTrailerCount)voidsetMaxTrailerSize(int maxTrailerSize)voidsetNoCompressionStrongETag(boolean noCompressionStrongETag)Deprecated.voidsetNoCompressionUserAgents(java.lang.String noCompressionUserAgents)voidsetOverheadContinuationThreshold(int overheadContinuationThreshold)voidsetOverheadCountFactor(int overheadCountFactor)voidsetOverheadDataThreshold(int overheadDataThreshold)voidsetOverheadWindowUpdateThreshold(int overheadWindowUpdateThreshold)voidsetReadTimeout(long readTimeout)voidsetStreamReadTimeout(long streamReadTimeout)voidsetStreamWriteTimeout(long streamWriteTimeout)voidsetUseSendfile(boolean useSendfile)voidsetWriteTimeout(long writeTimeout)booleanuseCompression(Request request, Response response)- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.apache.coyote.UpgradeProtocolsetHttp11Protocol
 
- 
 
- 
- 
- 
Method Detail- 
getHttpUpgradeNamepublic java.lang.String getHttpUpgradeName(boolean isSSLEnabled) - Specified by:
- getHttpUpgradeNamein interface- UpgradeProtocol
- Parameters:
- isSSLEnabled- Is this for a connector that is configured to support TLS. Some protocols (e.g. HTTP/2) only support HTTP upgrade over non-secure connections.
- Returns:
- The name that clients will use to request an upgrade to this protocol via an HTTP/1.1 upgrade request or
             nullif upgrade via an HTTP/1.1 upgrade request is not supported.
 
 - 
getAlpnIdentifierpublic byte[] getAlpnIdentifier() - Specified by:
- getAlpnIdentifierin interface- UpgradeProtocol
- Returns:
- The byte sequence as listed in the IANA registry for this protocol or nullif upgrade via ALPN is not supported.
 
 - 
getAlpnNamepublic java.lang.String getAlpnName() - Specified by:
- getAlpnNamein interface- UpgradeProtocol
- Returns:
- The name of the protocol as listed in the IANA registry if and only if UpgradeProtocol.getAlpnIdentifier()returns the UTF-8 encoding of this name. IfUpgradeProtocol.getAlpnIdentifier()returns some other byte sequence, then this method returns the empty string. If upgrade via ALPN is not supported thennullis returned.
 
 - 
getProcessorpublic Processor getProcessor(SocketWrapperBase<?> socketWrapper, Adapter adapter) - Specified by:
- getProcessorin interface- UpgradeProtocol
- Parameters:
- socketWrapper- The socketWrapper for the connection that requires a processor
- adapter- The Adapter instance that provides access to the standard Engine/Host/Context/Wrapper processing chain
- Returns:
- A processor instance for processing a connection using this protocol.
 
 - 
getInternalUpgradeHandlerpublic InternalHttpUpgradeHandler getInternalUpgradeHandler(SocketWrapperBase<?> socketWrapper, Adapter adapter, Request coyoteRequest) - Specified by:
- getInternalUpgradeHandlerin interface- UpgradeProtocol
- Parameters:
- socketWrapper- The socket
- adapter- The Adapter to use to configure the new upgrade handler
- coyoteRequest- A copy (may be incomplete) of the request that triggered the upgrade
- Returns:
- An instance of the HTTP upgrade handler for this protocol
 
 - 
acceptpublic boolean accept(Request request) Description copied from interface:UpgradeProtocolAllows the implementation to examine the request and accept or reject it based on what it finds.- Specified by:
- acceptin interface- UpgradeProtocol
- Parameters:
- request- The request that included an upgrade header for this protocol
- Returns:
- trueif the request is accepted, otherwise- false
 
 - 
getReadTimeoutpublic long getReadTimeout() 
 - 
setReadTimeoutpublic void setReadTimeout(long readTimeout) 
 - 
getWriteTimeoutpublic long getWriteTimeout() 
 - 
setWriteTimeoutpublic void setWriteTimeout(long writeTimeout) 
 - 
getKeepAliveTimeoutpublic long getKeepAliveTimeout() 
 - 
setKeepAliveTimeoutpublic void setKeepAliveTimeout(long keepAliveTimeout) 
 - 
getStreamReadTimeoutpublic long getStreamReadTimeout() 
 - 
setStreamReadTimeoutpublic void setStreamReadTimeout(long streamReadTimeout) 
 - 
getStreamWriteTimeoutpublic long getStreamWriteTimeout() 
 - 
setStreamWriteTimeoutpublic void setStreamWriteTimeout(long streamWriteTimeout) 
 - 
getMaxConcurrentStreamspublic long getMaxConcurrentStreams() 
 - 
setMaxConcurrentStreamspublic void setMaxConcurrentStreams(long maxConcurrentStreams) 
 - 
getMaxConcurrentStreamExecutionpublic int getMaxConcurrentStreamExecution() 
 - 
setMaxConcurrentStreamExecutionpublic void setMaxConcurrentStreamExecution(int maxConcurrentStreamExecution) 
 - 
getInitialWindowSizepublic int getInitialWindowSize() 
 - 
setInitialWindowSizepublic void setInitialWindowSize(int initialWindowSize) 
 - 
getUseSendfilepublic boolean getUseSendfile() 
 - 
setUseSendfilepublic void setUseSendfile(boolean useSendfile) 
 - 
setAllowedTrailerHeaderspublic void setAllowedTrailerHeaders(java.lang.String commaSeparatedHeaders) 
 - 
getAllowedTrailerHeaderspublic java.lang.String getAllowedTrailerHeaders() 
 - 
setMaxHeaderCountpublic void setMaxHeaderCount(int maxHeaderCount) 
 - 
getMaxHeaderCountpublic int getMaxHeaderCount() 
 - 
setMaxHeaderSizepublic void setMaxHeaderSize(int maxHeaderSize) 
 - 
getMaxHeaderSizepublic int getMaxHeaderSize() 
 - 
setMaxTrailerCountpublic void setMaxTrailerCount(int maxTrailerCount) 
 - 
getMaxTrailerCountpublic int getMaxTrailerCount() 
 - 
setMaxTrailerSizepublic void setMaxTrailerSize(int maxTrailerSize) 
 - 
getMaxTrailerSizepublic int getMaxTrailerSize() 
 - 
getOverheadCountFactorpublic int getOverheadCountFactor() 
 - 
setOverheadCountFactorpublic void setOverheadCountFactor(int overheadCountFactor) 
 - 
getOverheadContinuationThresholdpublic int getOverheadContinuationThreshold() 
 - 
setOverheadContinuationThresholdpublic void setOverheadContinuationThreshold(int overheadContinuationThreshold) 
 - 
getOverheadDataThresholdpublic int getOverheadDataThreshold() 
 - 
setOverheadDataThresholdpublic void setOverheadDataThreshold(int overheadDataThreshold) 
 - 
getOverheadWindowUpdateThresholdpublic int getOverheadWindowUpdateThreshold() 
 - 
setOverheadWindowUpdateThresholdpublic void setOverheadWindowUpdateThreshold(int overheadWindowUpdateThreshold) 
 - 
setInitiatePingDisabledpublic void setInitiatePingDisabled(boolean initiatePingDisabled) 
 - 
getInitiatePingDisabledpublic boolean getInitiatePingDisabled() 
 - 
setCompressionpublic void setCompression(java.lang.String compression) 
 - 
getCompressionpublic java.lang.String getCompression() 
 - 
getCompressionLevelprotected int getCompressionLevel() 
 - 
getNoCompressionUserAgentspublic java.lang.String getNoCompressionUserAgents() 
 - 
getNoCompressionUserAgentsPatternprotected java.util.regex.Pattern getNoCompressionUserAgentsPattern() 
 - 
setNoCompressionUserAgentspublic void setNoCompressionUserAgents(java.lang.String noCompressionUserAgents) 
 - 
getCompressibleMimeTypepublic java.lang.String getCompressibleMimeType() 
 - 
setCompressibleMimeTypepublic void setCompressibleMimeType(java.lang.String valueS) 
 - 
getCompressibleMimeTypespublic java.lang.String[] getCompressibleMimeTypes() 
 - 
getCompressionMinSizepublic int getCompressionMinSize() 
 - 
setCompressionMinSizepublic void setCompressionMinSize(int compressionMinSize) 
 - 
getNoCompressionStrongETag@Deprecated public boolean getNoCompressionStrongETag() Deprecated.
 - 
setNoCompressionStrongETag@Deprecated public void setNoCompressionStrongETag(boolean noCompressionStrongETag) Deprecated.
 - 
getContinueResponseTimingInternalpublic ContinueResponseTiming getContinueResponseTimingInternal() 
 - 
getHttp11Protocolpublic AbstractProtocol<?> getHttp11Protocol() 
 - 
setHttp11Protocolpublic void setHttp11Protocol(AbstractHttp11Protocol<?> http11Protocol) Description copied from interface:UpgradeProtocolConfigure the HTTP/1.1 protocol that this UpgradeProcotol is nested under. Connections passed to this UpgradeProtocol via HTTP upgrade will have been initially handled by this HTTP/1.1 protocol implementation.The default implementation is a NO-OP. - Specified by:
- setHttp11Protocolin interface- UpgradeProtocol
- Parameters:
- http11Protocol- The HTTP/1.1 protocol implementation that will initially handle any connections passed to this UpgradeProtocol via the HTTP upgrade mechanism
 
 - 
getUpgradeProtocolNamepublic java.lang.String getUpgradeProtocolName() 
 - 
getGlobalpublic RequestGroupInfo getGlobal() 
 
- 
 
-