public class Http2UpgradeHandler extends java.lang.Object implements InternalHttpUpgradeHandler
| Constructor and Description |
|---|
Http2UpgradeHandler(Adapter adapter,
Request coyoteRequest)
Deprecated.
This will be removed in Tomcat 9 onwards.
Use
Http2UpgradeHandler(Http2Protocol, Adapter, Request) |
Http2UpgradeHandler(Http2Protocol protocol,
Adapter adapter,
Request coyoteRequest) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
decrementWindowSize(int decrement) |
void |
destroy()
This method is called after the upgraded connection has been closed.
|
protected void |
doNotifyAll()
Deprecated.
|
protected void |
doWriteHeaders(Stream stream,
int pushedStreamId,
MimeHeaders mimeHeaders,
boolean endOfStream,
int payloadSize) |
void |
endRequestBodyFrame(int streamId) |
boolean |
fill(boolean block,
byte[] data) |
boolean |
fill(boolean block,
byte[] data,
int offset,
int length)
Fill the given array with data unless non-blocking is requested and
no data is available.
|
boolean |
fill(boolean block,
java.nio.ByteBuffer data,
int len) |
protected java.lang.String |
getConnectionId() |
HpackDecoder |
getHpackDecoder() |
int |
getIdAsInt() |
java.lang.Integer |
getIdentifier() |
long |
getKeepAliveTimeout() |
int |
getMaxFrameSize() |
int |
getMaxHeaderCount() |
int |
getMaxHeaderSize() |
int |
getMaxTrailerCount() |
int |
getMaxTrailerSize() |
long |
getReadTimeout() |
protected int |
getWeight() |
protected long |
getWindowSize() |
long |
getWriteTimeout() |
void |
goaway(int lastStreamId,
long errorCode,
java.lang.String debugData) |
void |
headersEnd(int streamId) |
org.apache.coyote.http2.HpackDecoder.HeaderEmitter |
headersStart(int streamId,
boolean headersEndStream) |
protected void |
incrementWindowSize(int increment)
Increment window size.
|
void |
incrementWindowSize(int streamId,
int increment) |
void |
init(WebConnection webConnection)
This method is called once the request/response pair where
HttpServletRequest.upgrade(Class) is called has completed
processing and is the point where control of the connection passes from
the container to the HttpUpgradeHandler. |
void |
pause() |
void |
pingReceive(byte[] payload,
boolean ack) |
void |
receivedEndOfStream(int streamId) |
void |
reprioritise(int streamId,
int parentStreamId,
boolean exclusive,
int weight) |
void |
reset(int streamId,
long errorCode) |
void |
setAllowedTrailerHeaders(java.util.Set<java.lang.String> allowedTrailerHeaders) |
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 |
setSocketWrapper(SocketWrapperBase<?> wrapper) |
void |
setSslSupport(SSLSupport sslSupport) |
void |
setting(Setting setting,
long value) |
void |
settingsEnd(boolean ack) |
protected void |
setWindowSize(long windowSize) |
void |
setWriteTimeout(long writeTimeout) |
java.nio.ByteBuffer |
startRequestBodyFrame(int streamId,
int payloadSize) |
void |
swallowed(int streamId,
FrameType frameType,
int flags,
int size) |
void |
swallowedPadding(int streamId,
int paddingLength) |
AbstractEndpoint.Handler.SocketState |
upgradeDispatch(SocketEvent status) |
@Deprecated public Http2UpgradeHandler(Adapter adapter, Request coyoteRequest)
Http2UpgradeHandler(Http2Protocol, Adapter, Request)adapter - The adapter to use to process the upgradecoyoteRequest - The request to use to process the upgradepublic Http2UpgradeHandler(Http2Protocol protocol, Adapter adapter, Request coyoteRequest)
public void init(WebConnection webConnection)
javax.servlet.http.HttpUpgradeHandlerHttpServletRequest.upgrade(Class) is called has completed
processing and is the point where control of the connection passes from
the container to the HttpUpgradeHandler.init in interface HttpUpgradeHandlerwebConnection - The connection that has been upgradedpublic void setSocketWrapper(SocketWrapperBase<?> wrapper)
setSocketWrapper in interface InternalHttpUpgradeHandlerpublic void setSslSupport(SSLSupport sslSupport)
setSslSupport in interface InternalHttpUpgradeHandlerpublic AbstractEndpoint.Handler.SocketState upgradeDispatch(SocketEvent status)
upgradeDispatch in interface InternalHttpUpgradeHandlerpublic void pause()
pause in interface InternalHttpUpgradeHandlerpublic void destroy()
javax.servlet.http.HttpUpgradeHandlerdestroy in interface HttpUpgradeHandlerprotected void doWriteHeaders(Stream stream, int pushedStreamId, MimeHeaders mimeHeaders, boolean endOfStream, int payloadSize) throws java.io.IOException
java.io.IOExceptionprotected void incrementWindowSize(int increment)
throws Http2Exception
increment - The amount by which the window size should be increasedHttp2Exception - If the window size is now higher than
the maximum allowed@Deprecated protected void doNotifyAll()
protected final java.lang.String getConnectionId()
protected final int getWeight()
public long getReadTimeout()
public void setReadTimeout(long readTimeout)
public long getKeepAliveTimeout()
public void setKeepAliveTimeout(long keepAliveTimeout)
public long getWriteTimeout()
public void setWriteTimeout(long writeTimeout)
public void setMaxConcurrentStreams(long maxConcurrentStreams)
public void setMaxConcurrentStreamExecution(int maxConcurrentStreamExecution)
public void setInitialWindowSize(int initialWindowSize)
public void setAllowedTrailerHeaders(java.util.Set<java.lang.String> allowedTrailerHeaders)
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)
public boolean fill(boolean block,
byte[] data)
throws java.io.IOException
java.io.IOExceptionpublic boolean fill(boolean block,
java.nio.ByteBuffer data,
int len)
throws java.io.IOException
java.io.IOExceptionpublic boolean fill(boolean block,
byte[] data,
int offset,
int length)
throws java.io.IOException
block - Should the first read into the provided buffer be a
blocking read or not.data - Buffer to filloffset - Position in buffer to start writinglength - Number of bytes to readtrue if the buffer was filled otherwise
falsejava.io.IOException - If an I/O occurred while obtaining data with
which to fill the bufferpublic int getMaxFrameSize()
public HpackDecoder getHpackDecoder()
public java.nio.ByteBuffer startRequestBodyFrame(int streamId,
int payloadSize)
throws Http2Exception
Http2Exceptionpublic void endRequestBodyFrame(int streamId)
throws Http2Exception
Http2Exceptionpublic void receivedEndOfStream(int streamId)
throws ConnectionException
ConnectionExceptionpublic void swallowedPadding(int streamId,
int paddingLength)
throws ConnectionException,
java.io.IOException
ConnectionExceptionjava.io.IOExceptionpublic org.apache.coyote.http2.HpackDecoder.HeaderEmitter headersStart(int streamId,
boolean headersEndStream)
throws Http2Exception,
java.io.IOException
Http2Exceptionjava.io.IOExceptionpublic void reprioritise(int streamId,
int parentStreamId,
boolean exclusive,
int weight)
throws Http2Exception
Http2Exceptionpublic void headersEnd(int streamId)
throws ConnectionException
ConnectionExceptionpublic void reset(int streamId,
long errorCode)
throws Http2Exception
Http2Exceptionpublic void setting(Setting setting, long value) throws ConnectionException
ConnectionExceptionpublic void settingsEnd(boolean ack)
throws java.io.IOException
java.io.IOExceptionpublic void pingReceive(byte[] payload,
boolean ack)
throws java.io.IOException
java.io.IOExceptionpublic void goaway(int lastStreamId,
long errorCode,
java.lang.String debugData)
public void incrementWindowSize(int streamId,
int increment)
throws Http2Exception
Http2Exceptionpublic void swallowed(int streamId,
FrameType frameType,
int flags,
int size)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.Integer getIdentifier()
public int getIdAsInt()
protected void setWindowSize(long windowSize)
protected long getWindowSize()
protected void decrementWindowSize(int decrement)
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.