public class Http2UpgradeHandler extends Object implements InternalHttpUpgradeHandler
Constructor and Description |
---|
Http2UpgradeHandler(Http2Protocol protocol,
Adapter adapter,
Request coyoteRequest) |
Modifier and Type | Method and Description |
---|---|
protected byte[] |
createWindowUpdateForSettings() |
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,
ByteBuffer data,
int len) |
protected String |
getConnectionId() |
HpackDecoder |
getHpackDecoder() |
int |
getIdAsInt() |
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,
String debugData) |
void |
headersContinue(int payloadSize,
boolean endOfHeaders) |
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(Set<String> allowedTrailerHeaders) |
protected void |
setConnectionTimeoutForStreamCount(int streamCount) |
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) |
ByteBuffer |
startRequestBodyFrame(int streamId,
int payloadSize,
boolean endOfStream) |
void |
swallowed(int streamId,
FrameType frameType,
int flags,
int size) |
void |
swallowedPadding(int streamId,
int paddingLength) |
void |
timeoutAsync(long now) |
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
protected void setConnectionTimeoutForStreamCount(int streamCount)
public void timeoutAsync(long now)
timeoutAsync
in interface InternalHttpUpgradeHandler
public void pause()
pause
in interface InternalHttpUpgradeHandler
public void destroy()
javax.servlet.http.HttpUpgradeHandler
destroy
in interface HttpUpgradeHandler
protected byte[] createWindowUpdateForSettings()
protected void doWriteHeaders(Stream stream, int pushedStreamId, MimeHeaders mimeHeaders, boolean endOfStream, int payloadSize) throws IOException
IOException
protected 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 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 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 IOException
IOException
public boolean fill(boolean block, ByteBuffer data, int len) throws IOException
IOException
public boolean fill(boolean block, byte[] data, int offset, int length) throws 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
IOException
- If an I/O occurred while obtaining data with
which to fill the bufferpublic int getMaxFrameSize()
public HpackDecoder getHpackDecoder()
public ByteBuffer startRequestBodyFrame(int streamId, int payloadSize, boolean endOfStream) 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, IOException
ConnectionException
IOException
public org.apache.coyote.http2.HpackDecoder.HeaderEmitter headersStart(int streamId, boolean headersEndStream) throws Http2Exception, IOException
Http2Exception
IOException
public void reprioritise(int streamId, int parentStreamId, boolean exclusive, int weight) throws Http2Exception
Http2Exception
public void headersContinue(int payloadSize, boolean endOfHeaders)
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 IOException
IOException
public void pingReceive(byte[] payload, boolean ack) throws IOException
IOException
public void goaway(int lastStreamId, long errorCode, String debugData)
public void incrementWindowSize(int streamId, int increment) throws Http2Exception
Http2Exception
public void swallowed(int streamId, FrameType frameType, int flags, int size) throws IOException
IOException
public Integer getIdentifier()
public int getIdAsInt()
protected void setWindowSize(long windowSize)
protected long getWindowSize()
protected void decrementWindowSize(int decrement)
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.