Package org.apache.coyote.http2
Class Http2Protocol
java.lang.Object
org.apache.coyote.http2.Http2Protocol
- All Implemented Interfaces:
- UpgradeProtocol
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanAllows the implementation to examine the request and accept or reject it based on what it finds.byte[]getHttpUpgradeName(boolean isSSLEnabled) intbooleangetInternalUpgradeHandler(SocketWrapperBase<?> socketWrapper, Adapter adapter, Request coyoteRequest) longintlongintintintintintintintintintgetProcessor(SocketWrapperBase<?> socketWrapper, Adapter adapter) longlonglongbooleanlongvoidsetHttp11Protocol(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) voidsetMaxTrailerCount(int maxTrailerCount) voidsetOverheadContinuationThreshold(int overheadContinuationThreshold) voidsetOverheadCountFactor(int overheadCountFactor) voidsetOverheadDataThreshold(int overheadDataThreshold) voidsetOverheadResetFactor(int overheadResetFactor) voidsetOverheadWindowUpdateThreshold(int overheadWindowUpdateThreshold) voidsetReadTimeout(long readTimeout) voidsetStreamReadTimeout(long streamReadTimeout) voidsetStreamWriteTimeout(long streamWriteTimeout) voidsetUseSendfile(boolean useSendfile) voidsetWriteTimeout(long writeTimeout) booleanuseCompression(Request request, Response response) 
- 
Constructor Details- 
Http2Protocolpublic Http2Protocol()
 
- 
- 
Method Details- 
getHttpUpgradeName- 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.
 
- 
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.
 
- 
getProcessor- 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
 
- 
acceptDescription 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) 
- 
setMaxHeaderCountpublic void setMaxHeaderCount(int maxHeaderCount) 
- 
getMaxHeaderCountpublic int getMaxHeaderCount()
- 
getMaxHeaderSizepublic int getMaxHeaderSize()
- 
setMaxTrailerCountpublic void setMaxTrailerCount(int maxTrailerCount) 
- 
getMaxTrailerCountpublic int getMaxTrailerCount()
- 
getMaxTrailerSizepublic int getMaxTrailerSize()
- 
getOverheadCountFactorpublic int getOverheadCountFactor()
- 
setOverheadCountFactorpublic void setOverheadCountFactor(int overheadCountFactor) 
- 
getOverheadResetFactorpublic int getOverheadResetFactor()
- 
setOverheadResetFactorpublic void setOverheadResetFactor(int overheadResetFactor) 
- 
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()
- 
useCompression
- 
getContinueResponseTimingInternal
- 
getHttp11Protocol
- 
setHttp11ProtocolDescription 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
 
- 
getUpgradeProtocolName
- 
getGlobal
 
-