Http2LifecycleManager Type — netty Architecture
Architecture documentation for the Http2LifecycleManager type/interface in Http2LifecycleManager.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD a395f41e_00af_371a_521b_8b41adfd4ffa["Http2LifecycleManager"] f97caaac_2cc0_b8a3_d2bc_7e6517dc4e1b["Http2LifecycleManager.java"] a395f41e_00af_371a_521b_8b41adfd4ffa -->|defined in| f97caaac_2cc0_b8a3_d2bc_7e6517dc4e1b style a395f41e_00af_371a_521b_8b41adfd4ffa fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http2/src/main/java/io/netty/handler/codec/http2/Http2LifecycleManager.java lines 26–96
public interface Http2LifecycleManager {
/**
* Closes the local side of the {@code stream}. Depending on the {@code stream} state this may result in
* {@code stream} being closed. See {@link #closeStream(Http2Stream, ChannelFuture)}.
* @param stream the stream to be half closed.
* @param future See {@link #closeStream(Http2Stream, ChannelFuture)}.
*/
void closeStreamLocal(Http2Stream stream, ChannelFuture future);
/**
* Closes the remote side of the {@code stream}. Depending on the {@code stream} state this may result in
* {@code stream} being closed. See {@link #closeStream(Http2Stream, ChannelFuture)}.
* @param stream the stream to be half closed.
* @param future See {@link #closeStream(Http2Stream, ChannelFuture)}.
*/
void closeStreamRemote(Http2Stream stream, ChannelFuture future);
/**
* Closes and deactivates the given {@code stream}. A listener is also attached to {@code future} and upon
* completion the underlying channel will be closed if {@link Http2Connection#numActiveStreams()} is 0.
* @param stream the stream to be closed and deactivated.
* @param future when completed if {@link Http2Connection#numActiveStreams()} is 0 then the underlying channel
* will be closed.
*/
void closeStream(Http2Stream stream, ChannelFuture future);
/**
* Ensure the stream identified by {@code streamId} is reset. If our local state does not indicate the stream has
* been reset yet then a {@code RST_STREAM} will be sent to the peer. If our local state indicates the stream
* has already been reset then the return status will indicate success without sending anything to the peer.
* @param ctx The context used for communication and buffer allocation if necessary.
* @param streamId The identifier of the stream to reset.
* @param errorCode Justification as to why this stream is being reset. See {@link Http2Error}.
* @param promise Used to indicate the return status of this operation.
* @return Will be considered successful when the connection and stream state has been updated, and a
* {@code RST_STREAM} frame has been sent to the peer. If the stream state has already been updated and a
* {@code RST_STREAM} frame has been sent then the return status may indicate success immediately.
*/
ChannelFuture resetStream(ChannelHandlerContext ctx, int streamId, long errorCode,
ChannelPromise promise);
/**
* Prevents the peer from creating streams and close the connection if {@code errorCode} is not
* {@link Http2Error#NO_ERROR}. After this call the peer is not allowed to create any new streams and the local
* endpoint will be limited to creating streams with {@code stream identifier <= lastStreamId}. This may result in
* sending a {@code GO_AWAY} frame (assuming we have not already sent one with
* {@code Last-Stream-ID <= lastStreamId}), or may just return success if a {@code GO_AWAY} has previously been
* sent.
* @param ctx The context used for communication and buffer allocation if necessary.
* @param lastStreamId The last stream that the local endpoint is claiming it will accept.
* @param errorCode The rational as to why the connection is being closed. See {@link Http2Error}.
* @param debugData For diagnostic purposes (carries no semantic value).
* @param promise Used to indicate the return status of this operation.
* @return Will be considered successful when the connection and stream state has been updated, and a
* {@code GO_AWAY} frame has been sent to the peer. If the stream state has already been updated and a
* {@code GO_AWAY} frame has been sent then the return status may indicate success immediately.
*/
ChannelFuture goAway(ChannelHandlerContext ctx, int lastStreamId, long errorCode,
ByteBuf debugData, ChannelPromise promise);
/**
* Processes the given error.
*
* @param ctx The context used for communication and buffer allocation if necessary.
* @param outbound {@code true} if the error was caused by an outbound operation and so the corresponding
* {@link ChannelPromise} was failed as well.
* @param cause the error.
*/
void onError(ChannelHandlerContext ctx, boolean outbound, Throwable cause);
}
Source
Frequently Asked Questions
What is the Http2LifecycleManager type?
Http2LifecycleManager is a type/interface in the netty codebase, defined in codec-http2/src/main/java/io/netty/handler/codec/http2/Http2LifecycleManager.java.
Where is Http2LifecycleManager defined?
Http2LifecycleManager is defined in codec-http2/src/main/java/io/netty/handler/codec/http2/Http2LifecycleManager.java at line 26.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free