Package | Description |
---|---|
io.netty.handler.codec.http2 |
Handlers for sending and receiving HTTP/2 frames.
|
Modifier and Type | Class and Description |
---|---|
static class |
Http2Exception.ClosedStreamCreationException
Used when a stream creation attempt fails but may be because the stream was previously closed.
|
static class |
Http2Exception.CompositeStreamException
Provides the ability to handle multiple stream exceptions with one throw statement.
|
static class |
Http2Exception.HeaderListSizeException |
static class |
Http2Exception.StreamException
Represents an exception that can be isolated to a single stream (as opposed to the entire connection).
|
class |
Http2NoMoreStreamIdsException
This exception is thrown when there are no more stream IDs available for the current connection
|
static class |
StreamBufferingEncoder.Http2ChannelClosedException
Thrown if buffered streams are terminated due to this encoder being closed.
|
static class |
StreamBufferingEncoder.Http2GoAwayException
Thrown by
StreamBufferingEncoder if buffered streams are terminated due to
receipt of a GOAWAY . |
Modifier and Type | Method and Description |
---|---|
static Http2Exception |
Http2Exception.closedStreamError(Http2Error error,
String fmt,
Object... args)
Use if an error has occurred which can not be isolated to a single stream, but instead applies
to the entire connection.
|
static Http2Exception |
Http2Exception.connectionError(Http2Error error,
String fmt,
Object... args)
Use if an error has occurred which can not be isolated to a single stream, but instead applies
to the entire connection.
|
static Http2Exception |
Http2Exception.connectionError(Http2Error error,
Throwable cause,
String fmt,
Object... args)
Use if an error has occurred which can not be isolated to a single stream, but instead applies
to the entire connection.
|
static Http2Exception |
Http2CodecUtil.getEmbeddedHttp2Exception(Throwable cause)
Iteratively looks through the causality chain for the given exception and returns the first
Http2Exception or null if none. |
static Http2Exception |
Http2Exception.headerListSizeError(int id,
Http2Error error,
boolean onDecode,
String fmt,
Object... args)
A specific stream error resulting from failing to decode headers that exceeds the max header size list.
|
static Http2Exception |
Http2Exception.streamError(int id,
Http2Error error,
String fmt,
Object... args)
Use if an error which can be isolated to a single stream has occurred.
|
static Http2Exception |
Http2Exception.streamError(int id,
Http2Error error,
Throwable cause,
String fmt,
Object... args)
Use if an error which can be isolated to a single stream has occurred.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
Http2Exception.isStreamError(Http2Exception e)
Check if an exception is isolated to a single stream or the entire connection.
|
protected void |
Http2ConnectionHandler.onConnectionError(ChannelHandlerContext ctx,
Throwable cause,
Http2Exception http2Ex)
Handler for a connection error.
|
static int |
Http2Exception.streamId(Http2Exception e)
Get the stream id associated with an exception.
|
Modifier and Type | Method and Description |
---|---|
static void |
HttpConversionUtil.addHttp2ToHttpHeaders(int streamId,
Http2Headers sourceHeaders,
FullHttpMessage destinationMessage,
boolean addToTrailer)
Translate and add HTTP/2 headers to HTTP/1.x headers.
|
static void |
HttpConversionUtil.addHttp2ToHttpHeaders(int streamId,
Http2Headers inputHeaders,
HttpHeaders outputHeaders,
HttpVersion httpVersion,
boolean isTrailer,
boolean isRequest)
Translate and add HTTP/2 headers to HTTP/1.x headers.
|
void |
Http2FlowController.channelHandlerContext(ChannelHandlerContext ctx)
Set the
ChannelHandlerContext for which to apply flow control on. |
void |
DefaultHttp2RemoteFlowController.channelHandlerContext(ChannelHandlerContext ctx)
Set the
ChannelHandlerContext for which to apply flow control on. |
void |
Http2RemoteFlowController.channelWritabilityChanged()
Notification that the writability of
Http2RemoteFlowController.channelHandlerContext() has changed. |
void |
DefaultHttp2RemoteFlowController.channelWritabilityChanged() |
boolean |
Http2LocalFlowController.consumeBytes(Http2Stream stream,
int numBytes)
Indicates that the application has consumed a number of bytes for the given stream and is therefore ready to
receive more data from the remote endpoint.
|
boolean |
DefaultHttp2LocalFlowController.consumeBytes(Http2Stream stream,
int numBytes) |
Http2Stream |
Http2Connection.Endpoint.createStream(int streamId,
boolean halfClosed)
Creates a stream initiated by this endpoint.
|
void |
Http2ConnectionDecoder.decodeFrame(ChannelHandlerContext ctx,
ByteBuf in,
List<Object> out)
Called by the
Http2ConnectionHandler to decode the next frame from the input buffer. |
void |
DefaultHttp2ConnectionDecoder.decodeFrame(ChannelHandlerContext ctx,
ByteBuf in,
List<Object> out) |
void |
DecoratingHttp2ConnectionDecoder.decodeFrame(ChannelHandlerContext ctx,
ByteBuf in,
List<Object> out) |
Http2Headers |
Http2HeadersDecoder.decodeHeaders(int streamId,
ByteBuf headerBlock)
Decodes the given headers block and returns the headers.
|
Http2Headers |
DefaultHttp2HeadersDecoder.decodeHeaders(int streamId,
ByteBuf headerBlock) |
boolean |
WeightedFairQueueByteDistributor.distribute(int maxBytes,
StreamByteDistributor.Writer writer) |
boolean |
UniformStreamByteDistributor.distribute(int maxBytes,
StreamByteDistributor.Writer writer) |
boolean |
StreamByteDistributor.distribute(int maxBytes,
StreamByteDistributor.Writer writer)
Distributes up to
maxBytes to those streams containing streamable bytes and
iterates across those streams to write the appropriate bytes. |
void |
Http2HeadersEncoder.encodeHeaders(int streamId,
Http2Headers headers,
ByteBuf buffer)
Encodes the given headers and writes the output headers block to the given output buffer.
|
void |
DefaultHttp2HeadersEncoder.encodeHeaders(int streamId,
Http2Headers headers,
ByteBuf buffer) |
void |
Http2ConnectionHandler.flush(ChannelHandlerContext ctx) |
Http2Stream |
Http2Connection.forEachActiveStream(Http2StreamVisitor visitor)
Provide a means of iterating over the collection of active streams.
|
Http2Stream |
DefaultHttp2Connection.forEachActiveStream(Http2StreamVisitor visitor) |
protected CharSequence |
DelegatingDecompressorFrameListener.getTargetContentEncoding(CharSequence contentEncoding)
Returns the expected content encoding of the decoded content.
|
protected CharSequence |
CompressorHttp2ConnectionEncoder.getTargetContentEncoding(CharSequence contentEncoding)
Returns the expected content encoding of the decoded content.
|
static void |
Http2CodecUtil.headerListSizeExceeded(int streamId,
long maxHeaderListSize,
boolean onDecode)
Results in a RST_STREAM being sent for
streamId due to violating
SETTINGS_MAX_HEADER_LIST_SIZE. |
static void |
Http2CodecUtil.headerListSizeExceeded(long maxHeaderListSize)
Results in a GO_AWAY being sent due to violating
SETTINGS_MAX_HEADER_LIST_SIZE in an unrecoverable
manner.
|
void |
Http2FlowController.incrementWindowSize(Http2Stream stream,
int delta)
Increments the size of the stream's flow control window by the given delta.
|
void |
DefaultHttp2RemoteFlowController.incrementWindowSize(Http2Stream stream,
int delta) |
void |
DefaultHttp2LocalFlowController.incrementWindowSize(Http2Stream stream,
int delta) |
void |
Http2FlowController.initialWindowSize(int newWindowSize)
Sets the connection-wide initial flow control window and updates all stream windows (but not the connection
stream window) by the delta.
|
void |
DefaultHttp2RemoteFlowController.initialWindowSize(int newWindowSize) |
void |
DefaultHttp2LocalFlowController.initialWindowSize(int newWindowSize) |
void |
Http2FrameSizePolicy.maxFrameSize(int max)
Sets the maximum allowed frame size.
|
void |
DefaultHttp2FrameWriter.maxFrameSize(int max) |
void |
DefaultHttp2FrameReader.maxFrameSize(int max) |
void |
Http2HeadersEncoder.Configuration.maxHeaderListSize(long max)
Represents the value for
SETTINGS_MAX_HEADER_LIST_SIZE.
|
void |
DefaultHttp2HeadersEncoder.maxHeaderListSize(long max) |
void |
Http2HeadersDecoder.Configuration.maxHeaderListSize(long max,
long goAwayMax)
Configure the maximum allowed size in bytes of each set of headers.
|
void |
DefaultHttp2HeadersDecoder.maxHeaderListSize(long max,
long goAwayMax) |
void |
Http2HeadersEncoder.Configuration.maxHeaderTableSize(long max)
Represents the value for
SETTINGS_HEADER_TABLE_SIZE.
|
void |
Http2HeadersDecoder.Configuration.maxHeaderTableSize(long max)
Represents the value for
SETTINGS_HEADER_TABLE_SIZE.
|
void |
DefaultHttp2HeadersEncoder.maxHeaderTableSize(long max) |
void |
DefaultHttp2HeadersDecoder.maxHeaderTableSize(long max) |
protected EmbeddedChannel |
CompressorHttp2ConnectionEncoder.newContentCompressor(ChannelHandlerContext ctx,
CharSequence contentEncoding)
Returns a new
EmbeddedChannel that encodes the HTTP2 message content encoded in the specified
contentEncoding . |
protected EmbeddedChannel |
DelegatingDecompressorFrameListener.newContentDecompressor(ChannelHandlerContext ctx,
CharSequence contentEncoding)
Returns a new
EmbeddedChannel that decodes the HTTP2 message content encoded in the specified
contentEncoding . |
protected FullHttpMessage |
InboundHttp2ToHttpAdapter.newMessage(Http2Stream stream,
Http2Headers headers,
boolean validateHttpHeaders,
ByteBufAllocator alloc)
Create a new
FullHttpMessage based upon the current connection parameters |
int |
InboundHttp2ToHttpAdapter.onDataRead(ChannelHandlerContext ctx,
int streamId,
ByteBuf data,
int padding,
boolean endOfStream) |
int |
Http2FrameListenerDecorator.onDataRead(ChannelHandlerContext ctx,
int streamId,
ByteBuf data,
int padding,
boolean endOfStream) |
int |
Http2FrameListener.onDataRead(ChannelHandlerContext ctx,
int streamId,
ByteBuf data,
int padding,
boolean endOfStream)
Handles an inbound
DATA frame. |
int |
Http2FrameAdapter.onDataRead(ChannelHandlerContext ctx,
int streamId,
ByteBuf data,
int padding,
boolean endOfStream) |
int |
Http2EventAdapter.onDataRead(ChannelHandlerContext ctx,
int streamId,
ByteBuf data,
int padding,
boolean endOfStream) |
int |
DelegatingDecompressorFrameListener.onDataRead(ChannelHandlerContext ctx,
int streamId,
ByteBuf data,
int padding,
boolean endOfStream) |
void |
Http2FrameListenerDecorator.onGoAwayRead(ChannelHandlerContext ctx,
int lastStreamId,
long errorCode,
ByteBuf debugData) |
void |
Http2FrameListener.onGoAwayRead(ChannelHandlerContext ctx,
int lastStreamId,
long errorCode,
ByteBuf debugData)
Handles an inbound
GO_AWAY frame. |
void |
Http2FrameAdapter.onGoAwayRead(ChannelHandlerContext ctx,
int lastStreamId,
long errorCode,
ByteBuf debugData) |
void |
Http2EventAdapter.onGoAwayRead(ChannelHandlerContext ctx,
int lastStreamId,
long errorCode,
ByteBuf debugData) |
void |
InboundHttp2ToHttpAdapter.onHeadersRead(ChannelHandlerContext ctx,
int streamId,
Http2Headers headers,
int padding,
boolean endOfStream) |
void |
Http2FrameListenerDecorator.onHeadersRead(ChannelHandlerContext ctx,
int streamId,
Http2Headers headers,
int padding,
boolean endStream) |
void |
Http2FrameListener.onHeadersRead(ChannelHandlerContext ctx,
int streamId,
Http2Headers headers,
int padding,
boolean endOfStream)
Handles an inbound
HEADERS frame. |
void |
Http2FrameAdapter.onHeadersRead(ChannelHandlerContext ctx,
int streamId,
Http2Headers headers,
int padding,
boolean endStream) |
void |
Http2EventAdapter.onHeadersRead(ChannelHandlerContext ctx,
int streamId,
Http2Headers headers,
int padding,
boolean endStream) |
void |
DelegatingDecompressorFrameListener.onHeadersRead(ChannelHandlerContext ctx,
int streamId,
Http2Headers headers,
int padding,
boolean endStream) |
void |
InboundHttp2ToHttpAdapter.onHeadersRead(ChannelHandlerContext ctx,
int streamId,
Http2Headers headers,
int streamDependency,
short weight,
boolean exclusive,
int padding,
boolean endOfStream) |
void |
Http2FrameListenerDecorator.onHeadersRead(ChannelHandlerContext ctx,
int streamId,
Http2Headers headers,
int streamDependency,
short weight,
boolean exclusive,
int padding,
boolean endStream) |
void |
Http2FrameListener.onHeadersRead(ChannelHandlerContext ctx,
int streamId,
Http2Headers headers,
int streamDependency,
short weight,
boolean exclusive,
int padding,
boolean endOfStream)
Handles an inbound
HEADERS frame with priority information specified. |
void |
Http2FrameAdapter.onHeadersRead(ChannelHandlerContext ctx,
int streamId,
Http2Headers headers,
int streamDependency,
short weight,
boolean exclusive,
int padding,
boolean endStream) |
void |
Http2EventAdapter.onHeadersRead(ChannelHandlerContext ctx,
int streamId,
Http2Headers headers,
int streamDependency,
short weight,
boolean exclusive,
int padding,
boolean endStream) |
void |
DelegatingDecompressorFrameListener.onHeadersRead(ChannelHandlerContext ctx,
int streamId,
Http2Headers headers,
int streamDependency,
short weight,
boolean exclusive,
int padding,
boolean endStream) |
void |
Http2ConnectionHandler.onHttpClientUpgrade()
Handles the client-side (cleartext) upgrade from HTTP to HTTP/2.
|
void |
Http2ConnectionHandler.onHttpServerUpgrade(Http2Settings settings)
Handles the server-side (cleartext) upgrade from HTTP to HTTP/2.
|
void |
Http2FrameListenerDecorator.onPingAckRead(ChannelHandlerContext ctx,
ByteBuf data) |
void |
Http2FrameListener.onPingAckRead(ChannelHandlerContext ctx,
ByteBuf data)
Handles an inbound
PING acknowledgment. |
void |
Http2FrameAdapter.onPingAckRead(ChannelHandlerContext ctx,
ByteBuf data) |
void |
Http2EventAdapter.onPingAckRead(ChannelHandlerContext ctx,
ByteBuf data) |
void |
Http2FrameListenerDecorator.onPingRead(ChannelHandlerContext ctx,
ByteBuf data) |
void |
Http2FrameListener.onPingRead(ChannelHandlerContext ctx,
ByteBuf data)
Handles an inbound
PING frame. |
void |
Http2FrameAdapter.onPingRead(ChannelHandlerContext ctx,
ByteBuf data) |
void |
Http2EventAdapter.onPingRead(ChannelHandlerContext ctx,
ByteBuf data) |
void |
Http2FrameListenerDecorator.onPriorityRead(ChannelHandlerContext ctx,
int streamId,
int streamDependency,
short weight,
boolean exclusive) |
void |
Http2FrameListener.onPriorityRead(ChannelHandlerContext ctx,
int streamId,
int streamDependency,
short weight,
boolean exclusive)
Handles an inbound
PRIORITY frame. |
void |
Http2FrameAdapter.onPriorityRead(ChannelHandlerContext ctx,
int streamId,
int streamDependency,
short weight,
boolean exclusive) |
void |
Http2EventAdapter.onPriorityRead(ChannelHandlerContext ctx,
int streamId,
int streamDependency,
short weight,
boolean exclusive) |
void |
InboundHttp2ToHttpAdapter.onPushPromiseRead(ChannelHandlerContext ctx,
int streamId,
int promisedStreamId,
Http2Headers headers,
int padding) |
void |
Http2FrameListenerDecorator.onPushPromiseRead(ChannelHandlerContext ctx,
int streamId,
int promisedStreamId,
Http2Headers headers,
int padding) |
void |
Http2FrameListener.onPushPromiseRead(ChannelHandlerContext ctx,
int streamId,
int promisedStreamId,
Http2Headers headers,
int padding)
Handles an inbound
PUSH_PROMISE frame. |
void |
Http2FrameAdapter.onPushPromiseRead(ChannelHandlerContext ctx,
int streamId,
int promisedStreamId,
Http2Headers headers,
int padding) |
void |
Http2EventAdapter.onPushPromiseRead(ChannelHandlerContext ctx,
int streamId,
int promisedStreamId,
Http2Headers headers,
int padding) |
void |
InboundHttp2ToHttpAdapter.onRstStreamRead(ChannelHandlerContext ctx,
int streamId,
long errorCode) |
void |
Http2FrameListenerDecorator.onRstStreamRead(ChannelHandlerContext ctx,
int streamId,
long errorCode) |
void |
Http2FrameListener.onRstStreamRead(ChannelHandlerContext ctx,
int streamId,
long errorCode)
Handles an inbound
RST_STREAM frame. |
void |
Http2FrameAdapter.onRstStreamRead(ChannelHandlerContext ctx,
int streamId,
long errorCode) |
void |
Http2EventAdapter.onRstStreamRead(ChannelHandlerContext ctx,
int streamId,
long errorCode) |
void |
Http2FrameListenerDecorator.onSettingsAckRead(ChannelHandlerContext ctx) |
void |
Http2FrameListener.onSettingsAckRead(ChannelHandlerContext ctx)
Handles an inbound
SETTINGS acknowledgment frame. |
void |
Http2FrameAdapter.onSettingsAckRead(ChannelHandlerContext ctx) |
void |
Http2EventAdapter.onSettingsAckRead(ChannelHandlerContext ctx) |
void |
InboundHttp2ToHttpAdapter.onSettingsRead(ChannelHandlerContext ctx,
Http2Settings settings) |
void |
Http2FrameListenerDecorator.onSettingsRead(ChannelHandlerContext ctx,
Http2Settings settings) |
void |
Http2FrameListener.onSettingsRead(ChannelHandlerContext ctx,
Http2Settings settings)
Handles an inbound
SETTINGS frame. |
void |
Http2FrameAdapter.onSettingsRead(ChannelHandlerContext ctx,
Http2Settings settings) |
void |
Http2EventAdapter.onSettingsRead(ChannelHandlerContext ctx,
Http2Settings settings) |
void |
Http2FrameListenerDecorator.onUnknownFrame(ChannelHandlerContext ctx,
byte frameType,
int streamId,
Http2Flags flags,
ByteBuf payload) |
void |
Http2FrameListener.onUnknownFrame(ChannelHandlerContext ctx,
byte frameType,
int streamId,
Http2Flags flags,
ByteBuf payload)
Handler for a frame not defined by the HTTP/2 spec.
|
void |
Http2EventAdapter.onUnknownFrame(ChannelHandlerContext ctx,
byte frameType,
int streamId,
Http2Flags flags,
ByteBuf payload) |
void |
Http2FrameListenerDecorator.onWindowUpdateRead(ChannelHandlerContext ctx,
int streamId,
int windowSizeIncrement) |
void |
Http2FrameListener.onWindowUpdateRead(ChannelHandlerContext ctx,
int streamId,
int windowSizeIncrement)
Handles an inbound
WINDOW_UPDATE frame. |
void |
Http2FrameAdapter.onWindowUpdateRead(ChannelHandlerContext ctx,
int streamId,
int windowSizeIncrement) |
void |
Http2EventAdapter.onWindowUpdateRead(ChannelHandlerContext ctx,
int streamId,
int windowSizeIncrement) |
Http2Stream |
Http2Stream.open(boolean halfClosed)
Opens this stream, making it available via
Http2Connection.forEachActiveStream(Http2StreamVisitor) and
transition state to:
Http2Stream.State.OPEN if Http2Stream.state() is Http2Stream.State.IDLE and halfClosed is false . |
static HttpResponseStatus |
HttpConversionUtil.parseStatus(CharSequence status)
Apply HTTP/2 rules while translating status code to
HttpResponseStatus |
protected FullHttpMessage |
InboundHttp2ToHttpAdapter.processHeadersBegin(ChannelHandlerContext ctx,
Http2Stream stream,
Http2Headers headers,
boolean endOfStream,
boolean allowAppend,
boolean appendToTrailer)
Provides translation between HTTP/2 and HTTP header objects while ensuring the stream
is in a valid state for additional headers.
|
void |
Http2InboundFrameLogger.readFrame(ChannelHandlerContext ctx,
ByteBuf input,
Http2FrameListener listener) |
void |
Http2FrameReader.readFrame(ChannelHandlerContext ctx,
ByteBuf input,
Http2FrameListener listener)
Attempts to read the next frame from the input buffer.
|
void |
DefaultHttp2FrameReader.readFrame(ChannelHandlerContext ctx,
ByteBuf input,
Http2FrameListener listener) |
void |
Http2LocalFlowController.receiveFlowControlledFrame(Http2Stream stream,
ByteBuf data,
int padding,
boolean endOfStream)
Receives an inbound
DATA frame from the remote endpoint and applies flow control policies to it for both
the stream as well as the connection. |
void |
DefaultHttp2LocalFlowController.receiveFlowControlledFrame(Http2Stream stream,
ByteBuf data,
int padding,
boolean endOfStream) |
void |
StreamBufferingEncoder.remoteSettings(Http2Settings settings) |
void |
Http2ConnectionEncoder.remoteSettings(Http2Settings settings)
Sets the settings for the remote endpoint of the HTTP/2 connection.
|
void |
DefaultHttp2ConnectionEncoder.remoteSettings(Http2Settings settings) |
void |
DecoratingHttp2ConnectionEncoder.remoteSettings(Http2Settings settings) |
Http2Stream |
Http2Connection.Endpoint.reservePushStream(int streamId,
Http2Stream parent)
Creates a push stream in the reserved state for this endpoint and notifies all listeners.
|
static FullHttpRequest |
HttpConversionUtil.toFullHttpRequest(int streamId,
Http2Headers http2Headers,
ByteBufAllocator alloc,
boolean validateHttpHeaders)
Create a new object to contain the request data
|
static HttpRequest |
HttpConversionUtil.toHttpRequest(int streamId,
Http2Headers http2Headers,
boolean validateHttpHeaders)
Create a new object to contain the request data.
|
static FullHttpResponse |
HttpConversionUtil.toHttpResponse(int streamId,
Http2Headers http2Headers,
ByteBufAllocator alloc,
boolean validateHttpHeaders)
Create a new object to contain the response data
|
boolean |
Http2StreamVisitor.visit(Http2Stream stream) |
float |
DefaultHttp2LocalFlowController.windowUpdateRatio(Http2Stream stream)
The window update ratio is used to determine when a window update must be sent.
|
void |
DefaultHttp2LocalFlowController.windowUpdateRatio(Http2Stream stream,
float ratio)
The window update ratio is used to determine when a window update must be sent.
|
void |
Http2RemoteFlowController.writePendingBytes()
Write all data pending in the flow controller up to the flow-control limits.
|
void |
DefaultHttp2RemoteFlowController.writePendingBytes() |
Copyright © 2008–2017 The Netty Project. All rights reserved.