Package | Description |
---|---|
io.netty.handler.codec.http2 |
Handlers for sending and receiving HTTP/2 frames.
|
Modifier and Type | Class and Description |
---|---|
static class |
Http2Exception.CompositeStreamException
Provides the ability to handle multiple stream exceptions with one throw statement.
|
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
|
Modifier and Type | Method and Description |
---|---|
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 causaility chain for the given exception and returns the first
Http2Exception or null if none. |
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 |
HttpUtil.addHttp2ToHttpHeaders(int streamId,
Http2Headers sourceHeaders,
FullHttpMessage destinationMessage,
boolean addToTrailer)
Translate and add HTTP/2 headers to HTTP/1.x headers
|
void |
Http2LocalFlowController.consumeBytes(ChannelHandlerContext ctx,
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.
|
void |
DefaultHttp2LocalFlowController.consumeBytes(ChannelHandlerContext ctx,
Http2Stream stream,
int numBytes) |
Http2Stream |
Http2Connection.createLocalStream(int streamId)
Creates a new stream initiated by the local endpoint
|
Http2Stream |
DefaultHttp2Connection.createLocalStream(int streamId) |
Http2Stream |
Http2Connection.createRemoteStream(int streamId)
Creates a new stream initiated by the remote endpoint.
|
Http2Stream |
DefaultHttp2Connection.createRemoteStream(int streamId) |
Http2Stream |
Http2Connection.Endpoint.createStream(int streamId)
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) |
Http2Headers |
Http2HeadersDecoder.decodeHeaders(ByteBuf headerBlock)
Decodes the given headers block and returns the headers.
|
Http2Headers |
DefaultHttp2HeadersDecoder.decodeHeaders(ByteBuf headerBlock) |
void |
Http2HeadersEncoder.encodeHeaders(Http2Headers headers,
ByteBuf buffer)
Encodes the given headers and writes the output headers block to the given output buffer.
|
void |
DefaultHttp2HeadersEncoder.encodeHeaders(Http2Headers headers,
ByteBuf buffer) |
protected AsciiString |
CompressorHttp2ConnectionEncoder.getTargetContentEncoding(AsciiString contentEncoding)
Returns the expected content encoding of the decoded content.
|
protected AsciiString |
DelegatingDecompressorFrameListener.getTargetContentEncoding(AsciiString contentEncoding)
Returns the expected content encoding of the decoded content.
|
void |
Http2FlowController.incrementWindowSize(ChannelHandlerContext ctx,
Http2Stream stream,
int delta)
Increments the size of the stream's flow control window by the given delta.
|
void |
DefaultHttp2RemoteFlowController.incrementWindowSize(ChannelHandlerContext ctx,
Http2Stream stream,
int delta) |
void |
DefaultHttp2LocalFlowController.incrementWindowSize(ChannelHandlerContext ctx,
Http2Stream stream,
int delta) |
void |
Http2FlowController.initialWindowSize(int newWindowSize)
Sets the initial flow control window and updates all stream windows (but not the connection
window) by the delta.
|
void |
DefaultHttp2RemoteFlowController.initialWindowSize(int newWindowSize) |
void |
DefaultHttp2LocalFlowController.initialWindowSize(int newWindowSize) |
void |
Http2ConnectionDecoder.localSettings(Http2Settings settings)
Sets the local settings for this endpoint of the HTTP/2 connection.
|
void |
DefaultHttp2ConnectionDecoder.localSettings(Http2Settings settings) |
void |
Http2FrameSizePolicy.maxFrameSize(int max)
Sets the maximum allowed frame size.
|
void |
DefaultHttp2FrameReader.maxFrameSize(int max) |
void |
DefaultHttp2FrameWriter.maxFrameSize(int max) |
void |
Http2HeaderTable.maxHeaderListSize(int max)
Sets the maximum allowed header elements.
|
void |
Http2HeaderTable.maxHeaderTableSize(int max)
Sets the maximum size of the HPACK header table used for decoding HTTP/2 headers.
|
protected EmbeddedChannel |
CompressorHttp2ConnectionEncoder.newContentCompressor(AsciiString contentEncoding)
Returns a new
EmbeddedChannel that encodes the HTTP2 message content encoded in the specified
contentEncoding . |
protected EmbeddedChannel |
DelegatingDecompressorFrameListener.newContentDecompressor(AsciiString contentEncoding)
Returns a new
EmbeddedChannel that decodes the HTTP2 message content encoded in the specified
contentEncoding . |
protected FullHttpMessage |
InboundHttp2ToHttpAdapter.newMessage(int streamId,
Http2Headers headers,
boolean validateHttpHeaders)
Create a new
FullHttpMessage based upon the current connection parameters |
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 |
InboundHttp2ToHttpAdapter.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 |
DelegatingDecompressorFrameListener.onDataRead(ChannelHandlerContext ctx,
int streamId,
ByteBuf data,
int padding,
boolean endOfStream) |
int |
Http2FrameListenerDecorator.onDataRead(ChannelHandlerContext ctx,
int streamId,
ByteBuf data,
int padding,
boolean endOfStream) |
void |
Http2FrameAdapter.onGoAwayRead(ChannelHandlerContext ctx,
int lastStreamId,
long errorCode,
ByteBuf debugData) |
void |
Http2EventAdapter.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 |
Http2FrameListenerDecorator.onGoAwayRead(ChannelHandlerContext ctx,
int lastStreamId,
long errorCode,
ByteBuf debugData) |
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 |
InboundHttp2ToHttpAdapter.onHeadersRead(ChannelHandlerContext ctx,
int streamId,
Http2Headers headers,
int padding,
boolean endOfStream) |
void |
Http2FrameListener.onHeadersRead(ChannelHandlerContext ctx,
int streamId,
Http2Headers headers,
int padding,
boolean endOfStream)
Handles an inbound HEADERS frame.
|
void |
DelegatingDecompressorFrameListener.onHeadersRead(ChannelHandlerContext ctx,
int streamId,
Http2Headers headers,
int padding,
boolean endStream) |
void |
Http2FrameListenerDecorator.onHeadersRead(ChannelHandlerContext ctx,
int streamId,
Http2Headers headers,
int padding,
boolean endStream) |
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 |
InboundHttp2ToHttpAdapter.onHeadersRead(ChannelHandlerContext ctx,
int streamId,
Http2Headers headers,
int streamDependency,
short weight,
boolean exclusive,
int padding,
boolean endOfStream) |
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 |
DelegatingDecompressorFrameListener.onHeadersRead(ChannelHandlerContext ctx,
int streamId,
Http2Headers headers,
int streamDependency,
short weight,
boolean exclusive,
int padding,
boolean endStream) |
void |
Http2FrameListenerDecorator.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 |
Http2FrameAdapter.onPingAckRead(ChannelHandlerContext ctx,
ByteBuf data) |
void |
Http2EventAdapter.onPingAckRead(ChannelHandlerContext ctx,
ByteBuf data) |
void |
Http2FrameListener.onPingAckRead(ChannelHandlerContext ctx,
ByteBuf data)
Handles an inbound PING acknowledgment.
|
void |
Http2FrameListenerDecorator.onPingAckRead(ChannelHandlerContext ctx,
ByteBuf data) |
void |
Http2FrameAdapter.onPingRead(ChannelHandlerContext ctx,
ByteBuf data) |
void |
Http2EventAdapter.onPingRead(ChannelHandlerContext ctx,
ByteBuf data) |
void |
Http2FrameListener.onPingRead(ChannelHandlerContext ctx,
ByteBuf data)
Handles an inbound PING frame.
|
void |
Http2FrameListenerDecorator.onPingRead(ChannelHandlerContext ctx,
ByteBuf data) |
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 |
Http2FrameListener.onPriorityRead(ChannelHandlerContext ctx,
int streamId,
int streamDependency,
short weight,
boolean exclusive)
Handles an inbound PRIORITY frame.
|
void |
InboundHttp2ToHttpPriorityAdapter.onPriorityRead(ChannelHandlerContext ctx,
int streamId,
int streamDependency,
short weight,
boolean exclusive) |
void |
Http2FrameListenerDecorator.onPriorityRead(ChannelHandlerContext ctx,
int streamId,
int streamDependency,
short weight,
boolean exclusive) |
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.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 |
Http2FrameListenerDecorator.onPushPromiseRead(ChannelHandlerContext ctx,
int streamId,
int promisedStreamId,
Http2Headers headers,
int padding) |
void |
Http2FrameAdapter.onRstStreamRead(ChannelHandlerContext ctx,
int streamId,
long errorCode) |
void |
Http2EventAdapter.onRstStreamRead(ChannelHandlerContext ctx,
int streamId,
long errorCode) |
void |
InboundHttp2ToHttpAdapter.onRstStreamRead(ChannelHandlerContext ctx,
int streamId,
long errorCode) |
void |
Http2FrameListener.onRstStreamRead(ChannelHandlerContext ctx,
int streamId,
long errorCode)
Handles an inbound RST_STREAM frame.
|
void |
Http2FrameListenerDecorator.onRstStreamRead(ChannelHandlerContext ctx,
int streamId,
long errorCode) |
void |
Http2FrameAdapter.onSettingsAckRead(ChannelHandlerContext ctx) |
void |
Http2EventAdapter.onSettingsAckRead(ChannelHandlerContext ctx) |
void |
Http2FrameListener.onSettingsAckRead(ChannelHandlerContext ctx)
Handles an inbound SETTINGS acknowledgment frame.
|
void |
Http2FrameListenerDecorator.onSettingsAckRead(ChannelHandlerContext ctx) |
void |
Http2FrameAdapter.onSettingsRead(ChannelHandlerContext ctx,
Http2Settings settings) |
void |
Http2EventAdapter.onSettingsRead(ChannelHandlerContext ctx,
Http2Settings settings) |
void |
InboundHttp2ToHttpAdapter.onSettingsRead(ChannelHandlerContext ctx,
Http2Settings settings) |
void |
Http2FrameListener.onSettingsRead(ChannelHandlerContext ctx,
Http2Settings settings)
Handles an inbound SETTINGS frame.
|
void |
Http2FrameListenerDecorator.onSettingsRead(ChannelHandlerContext ctx,
Http2Settings settings) |
void |
Http2FrameAdapter.onWindowUpdateRead(ChannelHandlerContext ctx,
int streamId,
int windowSizeIncrement) |
void |
Http2EventAdapter.onWindowUpdateRead(ChannelHandlerContext ctx,
int streamId,
int windowSizeIncrement) |
void |
Http2FrameListener.onWindowUpdateRead(ChannelHandlerContext ctx,
int streamId,
int windowSizeIncrement)
Handles an inbound WINDOW_UPDATE frame.
|
void |
Http2FrameListenerDecorator.onWindowUpdateRead(ChannelHandlerContext ctx,
int streamId,
int windowSizeIncrement) |
Http2Stream |
Http2Stream.open(boolean halfClosed)
Add this stream to
Http2Connection.activeStreams() and transition state to:
Http2Stream.State.OPEN if Http2Stream.state() is Http2Stream.State.IDLE and halfClosed is false . |
static HttpResponseStatus |
HttpUtil.parseStatus(AsciiString status)
Apply HTTP/2 rules while translating status code to
HttpResponseStatus |
protected FullHttpMessage |
InboundHttp2ToHttpAdapter.processHeadersBegin(ChannelHandlerContext ctx,
int streamId,
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.
|
protected FullHttpMessage |
InboundHttp2ToHttpPriorityAdapter.processHeadersBegin(ChannelHandlerContext ctx,
int streamId,
Http2Headers headers,
boolean endOfStream,
boolean allowAppend,
boolean appendToTrailer) |
void |
DefaultHttp2FrameReader.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 |
Http2InboundFrameLogger.readFrame(ChannelHandlerContext ctx,
ByteBuf input,
Http2FrameListener listener) |
void |
Http2LocalFlowController.receiveFlowControlledFrame(ChannelHandlerContext ctx,
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(ChannelHandlerContext ctx,
Http2Stream stream,
ByteBuf data,
int padding,
boolean endOfStream) |
void |
DefaultHttp2ConnectionEncoder.remoteSettings(Http2Settings settings) |
void |
Http2ConnectionEncoder.remoteSettings(Http2Settings settings)
Sets the settings for the remote endpoint of the HTTP/2 connection.
|
Http2Stream |
Http2Connection.requireStream(int streamId)
Attempts to get the stream for the given ID.
|
Http2Stream |
DefaultHttp2Connection.requireStream(int streamId) |
Http2Stream |
Http2Connection.Endpoint.reservePushStream(int streamId,
Http2Stream parent)
Creates a push stream in the reserved state for this endpoint and notifies all listeners.
|
Http2Stream |
Http2Stream.setPriority(int parentStreamId,
short weight,
boolean exclusive)
Updates an priority for this stream.
|
static FullHttpRequest |
HttpUtil.toHttpRequest(int streamId,
Http2Headers http2Headers,
boolean validateHttpHeaders)
Create a new object to contain the request data
|
static FullHttpResponse |
HttpUtil.toHttpResponse(int streamId,
Http2Headers http2Headers,
boolean validateHttpHeaders)
Create a new object to contain the response data
|
void |
DefaultHttp2LocalFlowController.windowUpdateRatio(ChannelHandlerContext ctx,
Http2Stream stream,
float ratio)
The window update ratio is used to determine when a window update must be sent.
|
float |
DefaultHttp2LocalFlowController.windowUpdateRatio(Http2Stream stream)
The window update ratio is used to determine when a window update must be sent.
|
Copyright © 2008–2015 The Netty Project. All rights reserved.