Top Description Methods
io.netty.handler.codec.http2

public Interface Http2ConnectionDecoder

extends Closeable
Known Direct Implementers
io.netty.handler.codec.http2.DecoratingHttp2ConnectionDecoder, io.netty.handler.codec.http2.DefaultHttp2ConnectionDecoder
Annotations
@UnstableApi
Imports
io.netty.buffer.ByteBuf, io.netty.channel.ChannelHandlerContext, io.netty.util.internal.UnstableApi, java.io.Closeable, java.util.List

Handler for inbound traffic on behalf of Http2ConnectionHandler. Performs basic protocol conformance on inbound frames before calling the delegate Http2FrameListener for application-specific processing. Note that frames of an unknown type (i.e. HTTP/2 extensions) will skip all protocol checks and be given directly to the listener for processing.

Method Summary

Modifier and TypeMethod and Description
public void
close()

Redeclares java.io.Closeable.close.

Closes this stream and releases any system resources associated with it.
public Http2Connection
connection()

Provides direct access to the underlying connection.

public void
decodeFrame(ChannelHandlerContext ctx, ByteBuf in, List<Object> out)

Called by the Http2ConnectionHandler to decode the next frame from the input buffer.

public Http2LocalFlowController
flowController()

Provides the local flow controller for managing inbound traffic.

public void
frameListener(Http2FrameListener listener)

Set the Http2FrameListener which will be notified when frames are decoded.

public Http2FrameListener
frameListener()

Get the Http2FrameListener which will be notified when frames are decoded.

public void
lifecycleManager(Http2LifecycleManager lifecycleManager)

Sets the lifecycle manager.

public Http2Settings
localSettings()

Gets the local settings for this endpoint of the HTTP/2 connection.

public boolean
prefaceReceived()

Indicates whether or not the first initial SETTINGS frame was received from the remote endpoint.

Method Detail

closeback to summary
public void close()

Redeclares java.io.Closeable.close.

Doc from java.io.Closeable.close.

Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect.

As noted in AutoCloseable#close(), cases where the close may fail require careful attention. It is strongly advised to relinquish the underlying resources and to internally mark the Closeable as closed, prior to throwing the IOException.

Annotations
@Override
connectionback to summary
public Http2Connection connection()

Provides direct access to the underlying connection.

decodeFrameback to summary
public void decodeFrame(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Http2Exception

Called by the Http2ConnectionHandler to decode the next frame from the input buffer.

flowControllerback to summary
public Http2LocalFlowController flowController()

Provides the local flow controller for managing inbound traffic.

frameListenerback to summary
public void frameListener(Http2FrameListener listener)

Set the Http2FrameListener which will be notified when frames are decoded.

This must be set before frames are decoded.

frameListenerback to summary
public Http2FrameListener frameListener()

Get the Http2FrameListener which will be notified when frames are decoded.

lifecycleManagerback to summary
public void lifecycleManager(Http2LifecycleManager lifecycleManager)

Sets the lifecycle manager. Must be called as part of initialization before the decoder is used.

localSettingsback to summary
public Http2Settings localSettings()

Gets the local settings for this endpoint of the HTTP/2 connection.

prefaceReceivedback to summary
public boolean prefaceReceived()

Indicates whether or not the first initial SETTINGS frame was received from the remote endpoint.