Home / Function/ setup() — netty Function Reference

setup() — netty Function Reference

Architecture documentation for the setup() function in DefaultHttp2RemoteFlowControllerTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  9fed0499_471e_ac3f_c01d_022267ff0534["setup()"]
  f8fd7697_92d4_6455_4dd8_09a33ac81a6f["DefaultHttp2RemoteFlowControllerTest"]
  9fed0499_471e_ac3f_c01d_022267ff0534 -->|defined in| f8fd7697_92d4_6455_4dd8_09a33ac81a6f
  fcf0135d_da22_5e56_b897_80632a4345f6["setChannelWritability()"]
  9fed0499_471e_ac3f_c01d_022267ff0534 -->|calls| fcf0135d_da22_5e56_b897_80632a4345f6
  3a8492ba_178f_22a5_9eb6_dfa34ba2d102["initConnectionAndController()"]
  9fed0499_471e_ac3f_c01d_022267ff0534 -->|calls| 3a8492ba_178f_22a5_9eb6_dfa34ba2d102
  2cd55558_d3f6_0fff_ea2b_3cf72da93d07["resetCtx()"]
  9fed0499_471e_ac3f_c01d_022267ff0534 -->|calls| 2cd55558_d3f6_0fff_ea2b_3cf72da93d07
  90444244_2b60_c843_559a_6c55d7a4e9ac["assertWritabilityChanged()"]
  9fed0499_471e_ac3f_c01d_022267ff0534 -->|calls| 90444244_2b60_c843_559a_6c55d7a4e9ac
  style 9fed0499_471e_ac3f_c01d_022267ff0534 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/test/java/io/netty/handler/codec/http2/DefaultHttp2RemoteFlowControllerTest.java lines 90–107

    @BeforeEach
    public void setup() throws Http2Exception {
        MockitoAnnotations.initMocks(this);

        when(ctx.newPromise()).thenReturn(promise);
        when(ctx.flush()).thenThrow(new AssertionFailedError("forbidden"));
        setChannelWritability(true);
        when(channel.config()).thenReturn(config);
        when(executor.inEventLoop()).thenReturn(true);

        initConnectionAndController();

        resetCtx();
        // This is intentionally left out of initConnectionAndController so it can be tested below.
        controller.channelHandlerContext(ctx);
        assertWritabilityChanged(1, true);
        reset(listener);
    }

Domain

Subdomains

Frequently Asked Questions

What does setup() do?
setup() is a function in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/DefaultHttp2RemoteFlowControllerTest.java.
Where is setup() defined?
setup() is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/DefaultHttp2RemoteFlowControllerTest.java at line 90.
What does setup() call?
setup() calls 4 function(s): assertWritabilityChanged, initConnectionAndController, resetCtx, setChannelWritability.

Analyze Your Own Codebase

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

Try Supermodel Free