public class Http2Protocol extends java.lang.Object implements UpgradeProtocol
| Constructor and Description |
|---|
Http2Protocol() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(Request request)
Allows the implementation to examine the request and accept or reject it based on what it finds.
|
java.lang.String |
getAllowedTrailerHeaders() |
byte[] |
getAlpnIdentifier() |
java.lang.String |
getAlpnName() |
java.lang.String |
getCompressibleMimeType() |
java.lang.String[] |
getCompressibleMimeTypes() |
java.lang.String |
getCompression() |
protected int |
getCompressionLevel() |
int |
getCompressionMinSize() |
ContinueResponseTiming |
getContinueResponseTimingInternal() |
RequestGroupInfo |
getGlobal() |
AbstractProtocol<?> |
getHttp11Protocol() |
java.lang.String |
getHttpUpgradeName(boolean isSSLEnabled) |
int |
getInitialWindowSize() |
boolean |
getInitiatePingDisabled() |
InternalHttpUpgradeHandler |
getInternalUpgradeHandler(SocketWrapperBase<?> socketWrapper,
Adapter adapter,
Request coyoteRequest) |
long |
getKeepAliveTimeout() |
int |
getMaxConcurrentStreamExecution() |
long |
getMaxConcurrentStreams() |
int |
getMaxHeaderCount() |
int |
getMaxHeaderSize() |
int |
getMaxTrailerCount() |
int |
getMaxTrailerSize() |
boolean |
getNoCompressionStrongETag()
Deprecated.
|
java.lang.String |
getNoCompressionUserAgents() |
protected java.util.regex.Pattern |
getNoCompressionUserAgentsPattern() |
int |
getOverheadContinuationThreshold() |
int |
getOverheadCountFactor() |
int |
getOverheadDataThreshold() |
int |
getOverheadResetFactor() |
int |
getOverheadWindowUpdateThreshold() |
Processor |
getProcessor(SocketWrapperBase<?> socketWrapper,
Adapter adapter) |
long |
getReadTimeout() |
long |
getStreamReadTimeout() |
long |
getStreamWriteTimeout() |
java.lang.String |
getUpgradeProtocolName() |
boolean |
getUseSendfile() |
long |
getWriteTimeout() |
void |
setAllowedTrailerHeaders(java.lang.String commaSeparatedHeaders) |
void |
setCompressibleMimeType(java.lang.String valueS) |
void |
setCompression(java.lang.String compression) |
void |
setCompressionMinSize(int compressionMinSize) |
void |
setHttp11Protocol(AbstractHttp11Protocol<?> http11Protocol)
Configure the HTTP/1.1 protocol that this UpgradeProcotol is nested under.
|
void |
setInitialWindowSize(int initialWindowSize) |
void |
setInitiatePingDisabled(boolean initiatePingDisabled) |
void |
setKeepAliveTimeout(long keepAliveTimeout) |
void |
setMaxConcurrentStreamExecution(int maxConcurrentStreamExecution) |
void |
setMaxConcurrentStreams(long maxConcurrentStreams) |
void |
setMaxHeaderCount(int maxHeaderCount) |
void |
setMaxHeaderSize(int maxHeaderSize) |
void |
setMaxTrailerCount(int maxTrailerCount) |
void |
setMaxTrailerSize(int maxTrailerSize) |
void |
setNoCompressionStrongETag(boolean noCompressionStrongETag)
Deprecated.
|
void |
setNoCompressionUserAgents(java.lang.String noCompressionUserAgents) |
void |
setOverheadContinuationThreshold(int overheadContinuationThreshold) |
void |
setOverheadCountFactor(int overheadCountFactor) |
void |
setOverheadDataThreshold(int overheadDataThreshold) |
void |
setOverheadResetFactor(int overheadResetFactor) |
void |
setOverheadWindowUpdateThreshold(int overheadWindowUpdateThreshold) |
void |
setReadTimeout(long readTimeout) |
void |
setStreamReadTimeout(long streamReadTimeout) |
void |
setStreamWriteTimeout(long streamWriteTimeout) |
void |
setUseSendfile(boolean useSendfile) |
void |
setWriteTimeout(long writeTimeout) |
boolean |
useCompression(Request request,
Response response) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetHttp11Protocolpublic java.lang.String getHttpUpgradeName(boolean isSSLEnabled)
getHttpUpgradeName in interface UpgradeProtocolisSSLEnabled - 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.null if upgrade via an HTTP/1.1 upgrade request is not supported.public byte[] getAlpnIdentifier()
getAlpnIdentifier in interface UpgradeProtocolnull if upgrade via
ALPN is not supported.public java.lang.String getAlpnName()
getAlpnName in interface UpgradeProtocolUpgradeProtocol.getAlpnIdentifier()
returns the UTF-8 encoding of this name. If UpgradeProtocol.getAlpnIdentifier() returns some other byte
sequence, then this method returns the empty string. If upgrade via ALPN is not supported then
null is returned.public Processor getProcessor(SocketWrapperBase<?> socketWrapper, Adapter adapter)
getProcessor in interface UpgradeProtocolsocketWrapper - The socketWrapper for the connection that requires a processoradapter - The Adapter instance that provides access to the standard Engine/Host/Context/Wrapper
processing chainpublic InternalHttpUpgradeHandler getInternalUpgradeHandler(SocketWrapperBase<?> socketWrapper, Adapter adapter, Request coyoteRequest)
getInternalUpgradeHandler in interface UpgradeProtocolsocketWrapper - The socketadapter - The Adapter to use to configure the new upgrade handlercoyoteRequest - A copy (may be incomplete) of the request that triggered the upgradepublic boolean accept(Request request)
UpgradeProtocolaccept in interface UpgradeProtocolrequest - The request that included an upgrade header for this protocoltrue if the request is accepted, otherwise falsepublic long getReadTimeout()
public void setReadTimeout(long readTimeout)
public long getWriteTimeout()
public void setWriteTimeout(long writeTimeout)
public long getKeepAliveTimeout()
public void setKeepAliveTimeout(long keepAliveTimeout)
public long getStreamReadTimeout()
public void setStreamReadTimeout(long streamReadTimeout)
public long getStreamWriteTimeout()
public void setStreamWriteTimeout(long streamWriteTimeout)
public long getMaxConcurrentStreams()
public void setMaxConcurrentStreams(long maxConcurrentStreams)
public int getMaxConcurrentStreamExecution()
public void setMaxConcurrentStreamExecution(int maxConcurrentStreamExecution)
public int getInitialWindowSize()
public void setInitialWindowSize(int initialWindowSize)
public boolean getUseSendfile()
public void setUseSendfile(boolean useSendfile)
public void setAllowedTrailerHeaders(java.lang.String commaSeparatedHeaders)
public java.lang.String getAllowedTrailerHeaders()
public void setMaxHeaderCount(int maxHeaderCount)
public int getMaxHeaderCount()
public void setMaxHeaderSize(int maxHeaderSize)
public int getMaxHeaderSize()
public void setMaxTrailerCount(int maxTrailerCount)
public int getMaxTrailerCount()
public void setMaxTrailerSize(int maxTrailerSize)
public int getMaxTrailerSize()
public int getOverheadCountFactor()
public void setOverheadCountFactor(int overheadCountFactor)
public int getOverheadResetFactor()
public void setOverheadResetFactor(int overheadResetFactor)
public int getOverheadContinuationThreshold()
public void setOverheadContinuationThreshold(int overheadContinuationThreshold)
public int getOverheadDataThreshold()
public void setOverheadDataThreshold(int overheadDataThreshold)
public int getOverheadWindowUpdateThreshold()
public void setOverheadWindowUpdateThreshold(int overheadWindowUpdateThreshold)
public void setInitiatePingDisabled(boolean initiatePingDisabled)
public boolean getInitiatePingDisabled()
public void setCompression(java.lang.String compression)
public java.lang.String getCompression()
protected int getCompressionLevel()
public java.lang.String getNoCompressionUserAgents()
protected java.util.regex.Pattern getNoCompressionUserAgentsPattern()
public void setNoCompressionUserAgents(java.lang.String noCompressionUserAgents)
public java.lang.String getCompressibleMimeType()
public void setCompressibleMimeType(java.lang.String valueS)
public java.lang.String[] getCompressibleMimeTypes()
public int getCompressionMinSize()
public void setCompressionMinSize(int compressionMinSize)
@Deprecated public boolean getNoCompressionStrongETag()
@Deprecated public void setNoCompressionStrongETag(boolean noCompressionStrongETag)
public ContinueResponseTiming getContinueResponseTimingInternal()
public AbstractProtocol<?> getHttp11Protocol()
public void setHttp11Protocol(AbstractHttp11Protocol<?> http11Protocol)
UpgradeProtocolThe default implementation is a NO-OP.
setHttp11Protocol in interface UpgradeProtocolhttp11Protocol - The HTTP/1.1 protocol implementation that will initially handle any connections passed to this
UpgradeProtocol via the HTTP upgrade mechanismpublic java.lang.String getUpgradeProtocolName()
public RequestGroupInfo getGlobal()
Copyright © 2000-2024 Apache Software Foundation.
Apache Tomcat, Tomcat, Apache, the Apache Tomcat logo and the Apache logo are either registered trademarks or trademarks of the Apache Software Foundation.