Class Http2ConnectionAdapter
- All Implemented Interfaces:
Http2Connection.Listener
Http2Connection.Listener methods.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonGoAwayReceived(int lastStreamId, long errorCode, ByteBuf debugData) Called when aGOAWAYwas received from the remote endpoint.voidonGoAwaySent(int lastStreamId, long errorCode, ByteBuf debugData) Called when aGOAWAYframe was sent for the connection.voidonStreamActive(Http2Stream stream) Notifies the listener that the given stream was made active (i.e.voidonStreamAdded(Http2Stream stream) Notifies the listener that the given stream was added to the connection.voidonStreamClosed(Http2Stream stream) Notifies the listener that the given stream is nowCLOSEDin both directions and will no longer be accessible viaHttp2Connection.forEachActiveStream(Http2StreamVisitor).voidonStreamHalfClosed(Http2Stream stream) Notifies the listener that the given stream has transitioned fromOPENtoHALF CLOSED.voidonStreamRemoved(Http2Stream stream) Notifies the listener that the given stream has now been removed from the connection and will no longer be returned viaHttp2Connection.stream(int).
-
Constructor Details
-
Http2ConnectionAdapter
public Http2ConnectionAdapter()
-
-
Method Details
-
onStreamAdded
Description copied from interface:Http2Connection.ListenerNotifies the listener that the given stream was added to the connection. This stream may not yet be active (i.e.OPENorHALF CLOSED).If a
RuntimeExceptionis thrown it will be logged and not propagated. Throwing from this method is not supported and is considered a programming error.- Specified by:
onStreamAddedin interfaceHttp2Connection.Listener
-
onStreamActive
Description copied from interface:Http2Connection.ListenerNotifies the listener that the given stream was made active (i.e.OPENorHALF CLOSED).If a
RuntimeExceptionis thrown it will be logged and not propagated. Throwing from this method is not supported and is considered a programming error.- Specified by:
onStreamActivein interfaceHttp2Connection.Listener
-
onStreamHalfClosed
Description copied from interface:Http2Connection.ListenerNotifies the listener that the given stream has transitioned fromOPENtoHALF CLOSED. This method will not be called until a state transition occurs from whenHttp2Connection.Listener.onStreamActive(Http2Stream)was called. The stream can be inspected to determine which side isHALF CLOSED.If a
RuntimeExceptionis thrown it will be logged and not propagated. Throwing from this method is not supported and is considered a programming error.- Specified by:
onStreamHalfClosedin interfaceHttp2Connection.Listener
-
onStreamClosed
Description copied from interface:Http2Connection.ListenerNotifies the listener that the given stream is nowCLOSEDin both directions and will no longer be accessible viaHttp2Connection.forEachActiveStream(Http2StreamVisitor).If a
RuntimeExceptionis thrown it will be logged and not propagated. Throwing from this method is not supported and is considered a programming error.- Specified by:
onStreamClosedin interfaceHttp2Connection.Listener
-
onStreamRemoved
Description copied from interface:Http2Connection.ListenerNotifies the listener that the given stream has now been removed from the connection and will no longer be returned viaHttp2Connection.stream(int). The connection may maintain inactive streams for some time before removing them.If a
RuntimeExceptionis thrown it will be logged and not propagated. Throwing from this method is not supported and is considered a programming error.- Specified by:
onStreamRemovedin interfaceHttp2Connection.Listener
-
onGoAwaySent
Description copied from interface:Http2Connection.ListenerCalled when aGOAWAYframe was sent for the connection.If a
RuntimeExceptionis thrown it will be logged and not propagated. Throwing from this method is not supported and is considered a programming error.- Specified by:
onGoAwaySentin interfaceHttp2Connection.Listener- Parameters:
lastStreamId- the last known stream of the remote endpoint.errorCode- the error code, if abnormal closure.debugData- application-defined debug data.
-
onGoAwayReceived
Description copied from interface:Http2Connection.ListenerCalled when aGOAWAYwas received from the remote endpoint. This event handler duplicatesHttp2FrameListener.onGoAwayRead(io.netty.channel.ChannelHandlerContext, int, long, ByteBuf)but is added here in order to simplify application logic for handlingGOAWAYin a uniform way. An application should generally not handle both events, but if it does this method is called second, after notifying theHttp2FrameListener.If a
RuntimeExceptionis thrown it will be logged and not propagated. Throwing from this method is not supported and is considered a programming error.- Specified by:
onGoAwayReceivedin interfaceHttp2Connection.Listener- Parameters:
lastStreamId- the last known stream of the remote endpoint.errorCode- the error code, if abnormal closure.debugData- application-defined debug data.
-