private final class Http2FrameCodec.ConnectionListener extends Http2ConnectionAdapter
| Modifier | Constructor and Description |
|---|---|
private |
ConnectionListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
onGoAwayReceived(int lastStreamId,
long errorCode,
ByteBuf debugData)
Called when a
GOAWAY was received from the remote endpoint. |
void |
onStreamActive(Http2Stream stream)
Notifies the listener that the given stream was made active (i.e.
|
void |
onStreamClosed(Http2Stream stream)
Notifies the listener that the given stream is now
CLOSED in both directions and will no longer
be accessible via Http2Connection.forEachActiveStream(Http2StreamVisitor). |
onGoAwaySent, onStreamAdded, onStreamHalfClosed, onStreamRemovedpublic void onStreamActive(Http2Stream stream)
Http2Connection.ListenerOPEN 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.
onStreamActive in interface Http2Connection.ListeneronStreamActive in class Http2ConnectionAdapterpublic void onStreamClosed(Http2Stream stream)
Http2Connection.ListenerCLOSED in both directions and will no longer
be accessible via Http2Connection.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.
onStreamClosed in interface Http2Connection.ListeneronStreamClosed in class Http2ConnectionAdapterpublic void onGoAwayReceived(int lastStreamId,
long errorCode,
ByteBuf debugData)
Http2Connection.ListenerGOAWAY was received from the remote endpoint. This event handler duplicates Http2FrameListener.onGoAwayRead(io.netty.channel.ChannelHandlerContext, int, long, io.netty.buffer.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.
onGoAwayReceived in interface Http2Connection.ListeneronGoAwayReceived in class Http2ConnectionAdapterlastStreamId - the last known stream of the remote endpoint.errorCode - the error code, if abnormal closure.debugData - application-defined debug data.