public class Http2Protocol extends 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.
|
String |
getAllowedTrailerHeaders() |
byte[] |
getAlpnIdentifier() |
String |
getAlpnName() |
String |
getHttpUpgradeName(boolean isSSLEnabled) |
int |
getInitialWindowSize() |
InternalHttpUpgradeHandler |
getInternalUpgradeHandler(Adapter adapter,
Request coyoteRequest) |
long |
getKeepAliveTimeout() |
int |
getMaxConcurrentStreamExecution() |
long |
getMaxConcurrentStreams() |
int |
getMaxHeaderCount() |
int |
getMaxHeaderSize() |
int |
getMaxTrailerCount() |
int |
getMaxTrailerSize() |
Processor |
getProcessor(SocketWrapperBase<?> socketWrapper,
Adapter adapter) |
long |
getReadTimeout() |
long |
getWriteTimeout() |
void |
setAllowedTrailerHeaders(String commaSeparatedHeaders) |
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 |
setReadTimeout(long readTimeout) |
void |
setWriteTimeout(long writeTimeout) |
public 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 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(Adapter adapter, Request coyoteRequest)
getInternalUpgradeHandler in interface UpgradeProtocoladapter - 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 getKeepAliveTimeout()
public void setKeepAliveTimeout(long keepAliveTimeout)
public long getWriteTimeout()
public void setWriteTimeout(long writeTimeout)
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 void setAllowedTrailerHeaders(String commaSeparatedHeaders)
public 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 void setInitiatePingDisabled(boolean initiatePingDisabled)
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.