setup() — netty Function Reference
Architecture documentation for the setup() function in DefaultHttp2PushPromiseFrameTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD cd2ffeef_aa84_a5b0_1f82_446edac6639c["setup()"] 7aa7c7e1_690b_4471_b638_23d3c29cb751["DefaultHttp2PushPromiseFrameTest"] cd2ffeef_aa84_a5b0_1f82_446edac6639c -->|defined in| 7aa7c7e1_690b_4471_b638_23d3c29cb751 style cd2ffeef_aa84_a5b0_1f82_446edac6639c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http2/src/test/java/io/netty/handler/codec/http2/DefaultHttp2PushPromiseFrameTest.java lines 49–91
@BeforeEach
public void setup() throws InterruptedException {
ServerBootstrap serverBootstrap = new ServerBootstrap()
.group(eventLoopGroup)
.channel(NioServerSocketChannel.class)
.childHandler(new ChannelInitializer<SocketChannel>() {
@Override
protected void initChannel(SocketChannel ch) {
ChannelPipeline pipeline = ch.pipeline();
Http2FrameCodec frameCodec = Http2FrameCodecBuilder.forServer()
.autoAckSettingsFrame(true)
.autoAckPingFrame(true)
.build();
pipeline.addLast(frameCodec);
pipeline.addLast(new ServerHandler());
}
});
ChannelFuture channelFuture = serverBootstrap.bind(0).sync();
final Bootstrap bootstrap = new Bootstrap()
.group(eventLoopGroup)
.channel(NioSocketChannel.class)
.handler(new ChannelInitializer<SocketChannel>() {
@Override
protected void initChannel(SocketChannel ch) {
ChannelPipeline pipeline = ch.pipeline();
Http2FrameCodec frameCodec = Http2FrameCodecBuilder.forClient()
.autoAckSettingsFrame(true)
.autoAckPingFrame(true)
.initialSettings(Http2Settings.defaultSettings().pushEnabled(true))
.build();
pipeline.addLast(frameCodec);
pipeline.addLast(clientHandler);
}
});
bootstrap.connect(channelFuture.channel().localAddress()).sync();
}
Domain
Subdomains
Defined In
Source
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/DefaultHttp2PushPromiseFrameTest.java.
Where is setup() defined?
setup() is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/DefaultHttp2PushPromiseFrameTest.java at line 49.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free