public class Http2UpgradeHandler extends Object implements InternalHttpUpgradeHandler
Constructor and Description |
---|
Http2UpgradeHandler(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() |
void |
endRequestBodyFrame(int streamId) |
default 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.
|
default boolean |
fill(boolean block,
ByteBuffer data,
int len) |
protected String |
getConnectionId() |
HpackDecoder |
getHpackDecoder() |
Integer |
getIdentifier() |
long |
getKeepAliveTimeout() |
int |
getMaxFrameSize() |
long |
getReadTimeout() |
protected int |
getWeight() |
protected long |
getWindowSize() |
long |
getWriteTimeout() |
void |
goaway(int lastStreamId,
long errorCode,
String debugData) |
void |
headersEnd(int streamId) |
HpackDecoder.HeaderEmitter |
headersStart(int streamId) |
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 |
receiveEndOfStream(int streamId) |
void |
reprioritise(int streamId,
int parentStreamId,
boolean exclusive,
int weight) |
void |
reset(int streamId,
long errorCode) |
void |
setInitialWindowSize(int initialWindowSize) |
void |
setKeepAliveTimeout(long keepAliveTimeout) |
void |
setMaxConcurrentStreamExecution(int maxConcurrentStreamExecution) |
void |
setMaxConcurrentStreams(long maxConcurrentStreams) |
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) |
void |
swallowed(int streamId,
FrameType frameType,
int flags,
int size) |
void |
swallowedPadding(int streamId,
int paddingLength) |
AbstractEndpoint.Handler.SocketState |
upgradeDispatch(SocketEvent status) |
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 allowedprotected 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 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) throws Http2Exception
Http2Exception
public void endRequestBodyFrame(int streamId) throws Http2Exception
Http2Exception
public void receiveEndOfStream(int streamId) throws ConnectionException
ConnectionException
public void swallowedPadding(int streamId, int paddingLength) throws ConnectionException, IOException
ConnectionException
IOException
public HpackDecoder.HeaderEmitter headersStart(int streamId) throws Http2Exception
Http2Exception
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 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 boolean fill(boolean block, byte[] data) throws IOException
IOException
public boolean fill(boolean block, ByteBuffer data, int len) throws IOException
IOException
public Integer getIdentifier()
protected void setWindowSize(long windowSize)
protected long getWindowSize()
protected void decrementWindowSize(int decrement)
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.