public class Http2UpgradeHandler extends Object implements InternalHttpUpgradeHandler
| Modifier and Type | Field and Description |
|---|---|
protected AtomicInteger |
activeRemoteStreamCount |
| 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() |
UpgradeInfo |
getUpgradeInfo() |
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) |
protected final AtomicInteger activeRemoteStreamCount
public 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 InternalHttpUpgradeHandlerprotected void setConnectionTimeoutForStreamCount(int streamCount)
public void timeoutAsync(long now)
timeoutAsync in interface InternalHttpUpgradeHandlerpublic void pause()
pause in interface InternalHttpUpgradeHandlerpublic void destroy()
javax.servlet.http.HttpUpgradeHandlerdestroy in interface HttpUpgradeHandlerpublic UpgradeInfo getUpgradeInfo()
getUpgradeInfo in interface InternalHttpUpgradeHandlerprotected byte[] createWindowUpdateForSettings()
protected void doWriteHeaders(Stream stream, int pushedStreamId, MimeHeaders mimeHeaders, boolean endOfStream, int payloadSize) throws IOException
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 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
IOExceptionpublic boolean fill(boolean block,
ByteBuffer data,
int len)
throws IOException
IOExceptionpublic 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
falseIOException - 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
Http2Exceptionpublic void endRequestBodyFrame(int streamId)
throws Http2Exception
Http2Exceptionpublic void receivedEndOfStream(int streamId)
throws ConnectionException
ConnectionExceptionpublic void swallowedPadding(int streamId,
int paddingLength)
throws ConnectionException,
IOException
ConnectionExceptionIOExceptionpublic org.apache.coyote.http2.HpackDecoder.HeaderEmitter headersStart(int streamId,
boolean headersEndStream)
throws Http2Exception,
IOException
Http2ExceptionIOExceptionpublic void reprioritise(int streamId,
int parentStreamId,
boolean exclusive,
int weight)
throws Http2Exception
Http2Exceptionpublic void headersContinue(int payloadSize,
boolean endOfHeaders)
public void headersEnd(int streamId)
throws Http2Exception
Http2Exceptionpublic void reset(int streamId,
long errorCode)
throws Http2Exception
Http2Exceptionpublic void setting(Setting setting, long value) throws ConnectionException
ConnectionExceptionpublic void settingsEnd(boolean ack)
throws IOException
IOExceptionpublic void pingReceive(byte[] payload,
boolean ack)
throws IOException
IOExceptionpublic void goaway(int lastStreamId,
long errorCode,
String debugData)
public void incrementWindowSize(int streamId,
int increment)
throws Http2Exception
Http2Exceptionpublic void swallowed(int streamId,
FrameType frameType,
int flags,
int size)
throws IOException
IOExceptionpublic Integer getIdentifier()
public int getIdAsInt()
protected void setWindowSize(long windowSize)
protected long getWindowSize()
protected void decrementWindowSize(int decrement)
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.