Home / Type/ State Type — netty Architecture

State Type — netty Architecture

Architecture documentation for the State type/interface in Http2Stream.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  fcc43df7_58a6_3c5d_0183_8263ea8c4758["State"]
  89418f96_cf5b_9e5d_c690_69b566f295d0["Http2Stream.java"]
  fcc43df7_58a6_3c5d_0183_8263ea8c4758 -->|defined in| 89418f96_cf5b_9e5d_c690_69b566f295d0
  style fcc43df7_58a6_3c5d_0183_8263ea8c4758 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/main/java/io/netty/handler/codec/http2/Http2Stream.java lines 26–58

    enum State {
        IDLE(false, false),
        RESERVED_LOCAL(false, false),
        RESERVED_REMOTE(false, false),
        OPEN(true, true),
        HALF_CLOSED_LOCAL(false, true),
        HALF_CLOSED_REMOTE(true, false),
        CLOSED(false, false);

        private final boolean localSideOpen;
        private final boolean remoteSideOpen;

        State(boolean localSideOpen, boolean remoteSideOpen) {
            this.localSideOpen = localSideOpen;
            this.remoteSideOpen = remoteSideOpen;
        }

        /**
         * Indicates whether the local side of this stream is open (i.e. the state is either
         * {@link State#OPEN} or {@link State#HALF_CLOSED_REMOTE}).
         */
        public boolean localSideOpen() {
            return localSideOpen;
        }

        /**
         * Indicates whether the remote side of this stream is open (i.e. the state is either
         * {@link State#OPEN} or {@link State#HALF_CLOSED_LOCAL}).
         */
        public boolean remoteSideOpen() {
            return remoteSideOpen;
        }
    }

Frequently Asked Questions

What is the State type?
State is a type/interface in the netty codebase, defined in codec-http2/src/main/java/io/netty/handler/codec/http2/Http2Stream.java.
Where is State defined?
State is defined in codec-http2/src/main/java/io/netty/handler/codec/http2/Http2Stream.java at line 26.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free