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

public Class Http2ConnectionAdapter

extends Object
implements Listener
Class Inheritance
All Implemented Interfaces
io.netty.handler.codec.http2.Http2Connection.Listener
Known Direct Subclasses
io.netty.handler.codec.http2.Http2FrameCodec.ConnectionListener
Annotations
@UnstableApi
Imports
io.netty.buffer.ByteBuf, io.netty.util.internal.UnstableApi

Provides empty implementations of all Http2Connection.Listener methods.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
onGoAwayReceived(int
the last known stream of the remote endpoint.
lastStreamId
,
long
the error code, if abnormal closure.
errorCode
,
ByteBuf
application-defined debug data.
debugData
)

Implements io.netty.handler.codec.http2.Http2Connection.Listener.onGoAwayReceived.

Called when a GOAWAY was received from the remote endpoint.
public void
onGoAwaySent(int
the last known stream of the remote endpoint.
lastStreamId
,
long
the error code, if abnormal closure.
errorCode
,
ByteBuf
application-defined debug data.
debugData
)

Implements io.netty.handler.codec.http2.Http2Connection.Listener.onGoAwaySent.

Called when a GOAWAY frame was sent for the connection.
public void
onStreamActive(Http2Stream stream)

Implements io.netty.handler.codec.http2.Http2Connection.Listener.onStreamActive.

Notifies the listener that the given stream was made active (i.e. OPEN or HALF CLOSED).
public void
onStreamAdded(Http2Stream stream)

Implements io.netty.handler.codec.http2.Http2Connection.Listener.onStreamAdded.

Notifies the listener that the given stream was added to the connection.
public void
onStreamClosed(Http2Stream stream)

Implements io.netty.handler.codec.http2.Http2Connection.Listener.onStreamClosed.

Notifies the listener that the given stream is now CLOSED in both directions and will no longer be accessible via forEachActiveStream(Http2StreamVisitor).
public void
onStreamHalfClosed(Http2Stream stream)

Implements io.netty.handler.codec.http2.Http2Connection.Listener.onStreamHalfClosed.

Notifies the listener that the given stream has transitioned from OPEN to HALF CLOSED.
public void
onStreamRemoved(Http2Stream stream)

Implements io.netty.handler.codec.http2.Http2Connection.Listener.onStreamRemoved.

Notifies the listener that the given stream has now been removed from the connection and will no longer be returned via Http2Connection#stream(int).
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Http2ConnectionAdapterback to summary
public Http2ConnectionAdapter()

Method Detail

onGoAwayReceivedback to summary
public void onGoAwayReceived(int lastStreamId, long errorCode, ByteBuf debugData)

Implements io.netty.handler.codec.http2.Http2Connection.Listener.onGoAwayReceived.

Doc from io.netty.handler.codec.http2.Http2Connection.Listener.onGoAwayReceived.

Called when a GOAWAY was received from the remote endpoint. This event handler duplicates Http2FrameListener#onGoAwayRead(io.netty.channel.ChannelHandlerContext, int, long, ByteBuf) but is added here in order to simplify application logic for handling GOAWAY in a uniform way. An application should generally not handle both events, but if it does this method is called second, after notifying the Http2FrameListener.

If a RuntimeException is thrown it will be logged and not propagated. Throwing from this method is not supported and is considered a programming error.

Parameters
lastStreamId:int

the last known stream of the remote endpoint.

errorCode:long

the error code, if abnormal closure.

debugData:ByteBuf

application-defined debug data.

Annotations
@Override
onGoAwaySentback to summary
public void onGoAwaySent(int lastStreamId, long errorCode, ByteBuf debugData)

Implements io.netty.handler.codec.http2.Http2Connection.Listener.onGoAwaySent.

Doc from io.netty.handler.codec.http2.Http2Connection.Listener.onGoAwaySent.

Called when a GOAWAY frame was sent for the connection.

If a RuntimeException is thrown it will be logged and not propagated. Throwing from this method is not supported and is considered a programming error.

Parameters
lastStreamId:int

the last known stream of the remote endpoint.

errorCode:long

the error code, if abnormal closure.

debugData:ByteBuf

application-defined debug data.

Annotations
@Override
onStreamActiveback to summary
public void onStreamActive(Http2Stream stream)

Implements io.netty.handler.codec.http2.Http2Connection.Listener.onStreamActive.

Doc from io.netty.handler.codec.http2.Http2Connection.Listener.onStreamActive.

Notifies the listener that the given stream was made active (i.e. OPEN or HALF CLOSED).

If a RuntimeException is thrown it will be logged and not propagated. Throwing from this method is not supported and is considered a programming error.

Annotations
@Override
onStreamAddedback to summary
public void onStreamAdded(Http2Stream stream)

Implements io.netty.handler.codec.http2.Http2Connection.Listener.onStreamAdded.

Doc from io.netty.handler.codec.http2.Http2Connection.Listener.onStreamAdded.

Notifies the listener that the given stream was added to the connection. This stream may not yet be active (i.e. OPEN or HALF CLOSED).

If a RuntimeException is thrown it will be logged and not propagated. Throwing from this method is not supported and is considered a programming error.

Annotations
@Override
onStreamClosedback to summary
public void onStreamClosed(Http2Stream stream)

Implements io.netty.handler.codec.http2.Http2Connection.Listener.onStreamClosed.

Doc from io.netty.handler.codec.http2.Http2Connection.Listener.onStreamClosed.

Notifies the listener that the given stream is now CLOSED in both directions and will no longer be accessible via forEachActiveStream(Http2StreamVisitor).

If a RuntimeException is thrown it will be logged and not propagated. Throwing from this method is not supported and is considered a programming error.

Annotations
@Override
onStreamHalfClosedback to summary
public void onStreamHalfClosed(Http2Stream stream)

Implements io.netty.handler.codec.http2.Http2Connection.Listener.onStreamHalfClosed.

Doc from io.netty.handler.codec.http2.Http2Connection.Listener.onStreamHalfClosed.

Notifies the listener that the given stream has transitioned from OPEN to HALF CLOSED. This method will not be called until a state transition occurs from when onStreamActive(Http2Stream) was called. The stream can be inspected to determine which side is HALF CLOSED.

If a RuntimeException is thrown it will be logged and not propagated. Throwing from this method is not supported and is considered a programming error.

Annotations
@Override
onStreamRemovedback to summary
public void onStreamRemoved(Http2Stream stream)

Implements io.netty.handler.codec.http2.Http2Connection.Listener.onStreamRemoved.

Doc from io.netty.handler.codec.http2.Http2Connection.Listener.onStreamRemoved.

Notifies the listener that the given stream has now been removed from the connection and will no longer be returned via Http2Connection#stream(int). The connection may maintain inactive streams for some time before removing them.

If a RuntimeException is thrown it will be logged and not propagated. Throwing from this method is not supported and is considered a programming error.

Annotations
@Override