HttpUpgradeHandler
, InternalHttpUpgradeHandler
public class Http2AsyncUpgradeHandler
extends java.lang.Object
Modifier and Type | Class | Description |
---|---|---|
protected class |
Http2AsyncUpgradeHandler.AsyncPingManager |
|
protected class |
Http2AsyncUpgradeHandler.SendfileCompletionHandler |
Modifier and Type | Field | Description |
---|---|---|
protected java.util.concurrent.atomic.AtomicInteger |
activeRemoteStreamCount |
|
protected java.lang.String |
connectionId |
|
protected static int |
FLAG_END_OF_HEADERS |
|
protected static int |
FLAG_END_OF_STREAM |
|
protected static byte[] |
GOAWAY |
|
protected org.apache.coyote.http2.ConnectionSettingsLocal |
localSettings |
Local settings are settings defined by Tomcat and sent to the client that
the client must use when communicating with Tomcat.
|
protected static Log |
log |
|
protected static byte[] |
PING |
|
protected static byte[] |
PING_ACK |
|
protected Http2Protocol |
protocol |
|
protected static byte[] |
SETTINGS_ACK |
|
protected static StringManager |
sm |
|
protected SocketWrapperBase<?> |
socketWrapper |
Constructor | Description |
---|---|
Http2AsyncUpgradeHandler(Http2Protocol protocol,
Adapter adapter,
Request coyoteRequest) |
Modifier and Type | Method | Description |
---|---|---|
void |
destroy() |
This method is called after the upgraded connection has been closed.
|
protected org.apache.coyote.http2.Http2UpgradeHandler.HeaderFrameBuffers |
doWriteHeaders(org.apache.coyote.http2.Stream stream,
int pushedStreamId,
MimeHeaders mimeHeaders,
boolean endOfStream,
int payloadSize) |
|
void |
endRequestBodyFrame(int streamId) |
|
default boolean |
fill(boolean block,
byte[] data) |
|
default boolean |
fill(boolean block,
java.nio.ByteBuffer data,
int len) |
|
boolean |
fill(boolean block,
byte[] data,
int offset,
int length) |
|
protected java.lang.String |
getConnectionId() |
|
protected org.apache.coyote.http2.Http2UpgradeHandler.HeaderFrameBuffers |
getHeaderFrameBuffers(int initialPayloadSize) |
|
HpackDecoder |
getHpackDecoder() |
|
protected org.apache.coyote.http2.HpackEncoder |
getHpackEncoder() |
|
int |
getMaxFrameSize() |
|
protected org.apache.coyote.http2.Http2Parser |
getParser(java.lang.String connectionId) |
|
protected org.apache.coyote.http2.Http2UpgradeHandler.PingManager |
getPingManager() |
|
protected int |
getWeight() |
|
void |
goaway(int lastStreamId,
long errorCode,
java.lang.String debugData) |
|
protected void |
handleAppInitiatedIOException(java.io.IOException ioe) |
|
boolean |
hasAsyncIO() |
|
void |
headersEnd(int streamId) |
|
org.apache.coyote.http2.HpackDecoder.HeaderEmitter |
headersStart(int streamId,
boolean headersEndStream) |
|
protected void |
incrementWindowSize(int increment) |
|
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) |
|
protected void |
processConnection(WebConnection webConnection,
org.apache.coyote.http2.Stream stream) |
|
protected SendfileState |
processSendfile(org.apache.coyote.http2.SendfileData sendfile) |
Process send file (if supported) for the given stream.
|
protected void |
processStreamOnContainerThread(org.apache.coyote.http2.Stream stream) |
|
protected void |
processWrites() |
|
void |
receivedEndOfStream(int streamId) |
|
void |
reprioritise(int streamId,
int parentStreamId,
boolean exclusive,
int weight) |
|
void |
reset(int streamId,
long errorCode) |
|
void |
setSocketWrapper(SocketWrapperBase<?> wrapper) |
|
void |
setSslSupport(SSLSupport sslSupport) |
|
void |
setting(org.apache.coyote.http2.Setting setting,
long value) |
|
void |
settingsEnd(boolean ack) |
|
java.nio.ByteBuffer |
startRequestBodyFrame(int streamId,
int payloadSize) |
|
void |
swallowed(int streamId,
org.apache.coyote.http2.FrameType frameType,
int flags,
int size) |
|
void |
swallowedPadding(int streamId,
int paddingLength) |
|
AbstractEndpoint.Handler.SocketState |
upgradeDispatch(SocketEvent status) |
|
protected void |
writeGoAwayFrame(int maxStreamId,
long errorCode,
byte[] debugMsg) |
|
protected void |
writeSettings() |
protected static final Log log
protected static final StringManager sm
protected static final int FLAG_END_OF_STREAM
protected static final int FLAG_END_OF_HEADERS
protected static final byte[] PING
protected static final byte[] PING_ACK
protected static final byte[] SETTINGS_ACK
protected static final byte[] GOAWAY
protected final java.lang.String connectionId
protected final Http2Protocol protocol
protected volatile SocketWrapperBase<?> socketWrapper
protected final org.apache.coyote.http2.ConnectionSettingsLocal localSettings
protected final java.util.concurrent.atomic.AtomicInteger activeRemoteStreamCount
public Http2AsyncUpgradeHandler(Http2Protocol protocol, Adapter adapter, Request coyoteRequest)
protected org.apache.coyote.http2.Http2Parser getParser(java.lang.String connectionId)
protected org.apache.coyote.http2.Http2UpgradeHandler.PingManager getPingManager()
public boolean hasAsyncIO()
protected void processConnection(WebConnection webConnection, org.apache.coyote.http2.Stream stream)
protected void writeSettings()
protected void writeGoAwayFrame(int maxStreamId, long errorCode, byte[] debugMsg) throws java.io.IOException
java.io.IOException
protected org.apache.coyote.http2.Http2UpgradeHandler.HeaderFrameBuffers getHeaderFrameBuffers(int initialPayloadSize)
public void settingsEnd(boolean ack) throws java.io.IOException
java.io.IOException
protected SendfileState processSendfile(org.apache.coyote.http2.SendfileData sendfile)
sendfile
- The stream and associated data to processpublic 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 upgradedprotected void processStreamOnContainerThread(org.apache.coyote.http2.Stream stream)
public 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 org.apache.coyote.http2.Http2UpgradeHandler.HeaderFrameBuffers doWriteHeaders(org.apache.coyote.http2.Stream stream, int pushedStreamId, MimeHeaders mimeHeaders, boolean endOfStream, int payloadSize) throws java.io.IOException
java.io.IOException
protected org.apache.coyote.http2.HpackEncoder getHpackEncoder()
protected void handleAppInitiatedIOException(java.io.IOException ioe) throws java.io.IOException
java.io.IOException
protected void processWrites() throws java.io.IOException
java.io.IOException
protected void incrementWindowSize(int increment) throws org.apache.coyote.http2.Http2Exception
org.apache.coyote.http2.Http2Exception
protected final java.lang.String getConnectionId()
protected final int getWeight()
public boolean fill(boolean block, byte[] data, int offset, int length) throws java.io.IOException
java.io.IOException
public int getMaxFrameSize()
public HpackDecoder getHpackDecoder()
public java.nio.ByteBuffer startRequestBodyFrame(int streamId, int payloadSize) throws org.apache.coyote.http2.Http2Exception
org.apache.coyote.http2.Http2Exception
public void endRequestBodyFrame(int streamId) throws org.apache.coyote.http2.Http2Exception
org.apache.coyote.http2.Http2Exception
public void receivedEndOfStream(int streamId) throws org.apache.coyote.http2.ConnectionException
org.apache.coyote.http2.ConnectionException
public void swallowedPadding(int streamId, int paddingLength) throws org.apache.coyote.http2.ConnectionException, java.io.IOException
org.apache.coyote.http2.ConnectionException
java.io.IOException
public org.apache.coyote.http2.HpackDecoder.HeaderEmitter headersStart(int streamId, boolean headersEndStream) throws org.apache.coyote.http2.Http2Exception, java.io.IOException
org.apache.coyote.http2.Http2Exception
java.io.IOException
public void reprioritise(int streamId, int parentStreamId, boolean exclusive, int weight) throws org.apache.coyote.http2.Http2Exception
org.apache.coyote.http2.Http2Exception
public void headersEnd(int streamId) throws org.apache.coyote.http2.ConnectionException
org.apache.coyote.http2.ConnectionException
public void reset(int streamId, long errorCode) throws org.apache.coyote.http2.Http2Exception
org.apache.coyote.http2.Http2Exception
public void setting(org.apache.coyote.http2.Setting setting, long value) throws org.apache.coyote.http2.ConnectionException
org.apache.coyote.http2.ConnectionException
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 org.apache.coyote.http2.Http2Exception
org.apache.coyote.http2.Http2Exception
public void swallowed(int streamId, org.apache.coyote.http2.FrameType frameType, int flags, int size) throws java.io.IOException
java.io.IOException
public default boolean fill(boolean block, byte[] data) throws java.io.IOException
java.io.IOException
public default boolean fill(boolean block, java.nio.ByteBuffer data, int len) throws java.io.IOException
java.io.IOException
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.