public class Http2ConnectionAdapter extends Object implements Http2Connection.Listener
Http2Connection.Listener methods.| Constructor and Description |
|---|
Http2ConnectionAdapter() |
| 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 |
onGoAwaySent(int lastStreamId,
long errorCode,
ByteBuf debugData)
Called when a
GOAWAY frame was sent for the connection. |
void |
onPriorityTreeParentChanged(Http2Stream stream,
Http2Stream oldParent)
Notifies the listener that a priority tree parent change has occurred.
|
void |
onPriorityTreeParentChanging(Http2Stream stream,
Http2Stream newParent)
Notifies the listener that a parent dependency is about to change
This is called while the tree is being restructured and so the tree
structure is not necessarily steady state.
|
void |
onStreamActive(Http2Stream stream)
Notifies the listener that the given stream was made active (i.e.
|
void |
onStreamAdded(Http2Stream stream)
Notifies the listener that the given stream was added to the connection.
|
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). |
void |
onStreamHalfClosed(Http2Stream stream)
Notifies the listener that the given stream has transitioned from
OPEN to HALF CLOSED. |
void |
onStreamRemoved(Http2Stream stream)
Notifies the listener that the given stream has now been removed from the connection and
will no longer be returned via
Http2Connection.stream(int). |
void |
onWeightChanged(Http2Stream stream,
short oldWeight)
Notifies the listener that the weight has changed for
stream. |
public void onStreamAdded(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.
onStreamAdded in interface Http2Connection.Listenerpublic 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.Listenerpublic void onStreamHalfClosed(Http2Stream stream)
Http2Connection.ListenerOPEN to HALF CLOSED.
This method will not be called until a state transition occurs from when
Http2Connection.Listener.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.
onStreamHalfClosed in interface Http2Connection.Listenerpublic 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.Listenerpublic void onStreamRemoved(Http2Stream stream)
Http2Connection.ListenerHttp2Connection.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.
onStreamRemoved in interface Http2Connection.Listenerpublic void onGoAwaySent(int lastStreamId,
long errorCode,
ByteBuf debugData)
Http2Connection.ListenerGOAWAY 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.
onGoAwaySent in interface Http2Connection.ListenerlastStreamId - the last known stream of the remote endpoint.errorCode - the error code, if abnormal closure.debugData - application-defined debug data.public 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.ListenerlastStreamId - the last known stream of the remote endpoint.errorCode - the error code, if abnormal closure.debugData - application-defined debug data.public void onPriorityTreeParentChanged(Http2Stream stream, Http2Stream oldParent)
Http2Connection.Listener
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.
onPriorityTreeParentChanged in interface Http2Connection.Listenerstream - The stream which had a parent change (new parent and children will be steady state)oldParent - The old parent which stream used to be a child of (may be null)public void onPriorityTreeParentChanging(Http2Stream stream, Http2Stream newParent)
Http2Connection.Listener
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.
onPriorityTreeParentChanging in interface Http2Connection.Listenerstream - The stream which the parent is about to change to newParentnewParent - The stream which will be the parent of streampublic void onWeightChanged(Http2Stream stream, short oldWeight)
Http2Connection.Listenerstream.
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.
onWeightChanged in interface Http2Connection.Listenerstream - The stream which the weight has changedoldWeight - The old weight for streamCopyright © 2008–2016 The Netty Project. All rights reserved.