public class Http2UpgradeHandler extends java.lang.Object implements InternalHttpUpgradeHandler
Constructor and Description |
---|
Http2UpgradeHandler(Adapter adapter,
Request coyoteRequest) |
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.
|
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() |
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) |
public Http2UpgradeHandler(Http2Protocol protocol, Adapter adapter, Request coyoteRequest)
public void init(WebConnection webConnection)
javax.servlet.http.HttpUpgradeHandler
HttpServletRequest.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 HttpUpgradeHandler
webConnection
- The connection that has been upgradedpublic void setSocketWrapper(SocketWrapperBase<?> wrapper)
setSocketWrapper
in interface InternalHttpUpgradeHandler
public void setSslSupport(SSLSupport sslSupport)
setSslSupport
in interface InternalHttpUpgradeHandler
public AbstractEndpoint.Handler.SocketState upgradeDispatch(SocketEvent status)
upgradeDispatch
in interface InternalHttpUpgradeHandler
public void pause()
pause
in interface InternalHttpUpgradeHandler
public void destroy()
javax.servlet.http.HttpUpgradeHandler
destroy
in interface HttpUpgradeHandler
protected void incrementWindowSize(int increment) throws Http2Exception
increment
- The amount of the incrementationHttp2Exception
- 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.IOException
public boolean fill(boolean block, java.nio.ByteBuffer data, int len) throws java.io.IOException
java.io.IOException
public 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
false
java.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
Http2Exception
public void endRequestBodyFrame(int streamId) throws Http2Exception
Http2Exception
public void receivedEndOfStream(int streamId) throws ConnectionException
ConnectionException
public void swallowedPadding(int streamId, int paddingLength) throws ConnectionException, java.io.IOException
ConnectionException
java.io.IOException
public org.apache.coyote.http2.HpackDecoder.HeaderEmitter headersStart(int streamId, boolean headersEndStream) throws Http2Exception, java.io.IOException
Http2Exception
java.io.IOException
public void reprioritise(int streamId, int parentStreamId, boolean exclusive, int weight) throws Http2Exception
Http2Exception
public void headersEnd(int streamId) throws ConnectionException
ConnectionException
public void reset(int streamId, long errorCode) throws Http2Exception
Http2Exception
public void setting(Setting setting, long value) throws ConnectionException
ConnectionException
public void settingsEnd(boolean ack) throws java.io.IOException
java.io.IOException
public void pingReceive(byte[] payload, boolean ack) throws java.io.IOException
java.io.IOException
public void goaway(int lastStreamId, long errorCode, java.lang.String debugData)
public void incrementWindowSize(int streamId, int increment) throws Http2Exception
Http2Exception
public void swallowed(int streamId, FrameType frameType, int flags, int size) throws java.io.IOException
java.io.IOException
public java.lang.Integer getIdentifier()
protected void setWindowSize(long windowSize)
protected long getWindowSize()
protected void decrementWindowSize(int decrement)
Copyright © 2000-2022 Apache Software Foundation. All Rights Reserved.