Home / Function/ initChannel() — netty Function Reference

initChannel() — netty Function Reference

Architecture documentation for the initChannel() function in TelnetServerInitializer.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  28ad10df_86de_cbdf_2d27_aaf1b48ca8a3["initChannel()"]
  6c5d041f_5c09_62f6_b9a1_64e97aca427f["TelnetServerInitializer"]
  28ad10df_86de_cbdf_2d27_aaf1b48ca8a3 -->|defined in| 6c5d041f_5c09_62f6_b9a1_64e97aca427f
  style 28ad10df_86de_cbdf_2d27_aaf1b48ca8a3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

example/src/main/java/io/netty/example/telnet/TelnetServerInitializer.java lines 43–59

    @Override
    public void initChannel(SocketChannel ch) throws Exception {
        ChannelPipeline pipeline = ch.pipeline();

        if (sslCtx != null) {
            pipeline.addLast(sslCtx.newHandler(ch.alloc()));
        }

        // Add the text line codec combination first,
        pipeline.addLast(new DelimiterBasedFrameDecoder(8192, Delimiters.lineDelimiter()));
        // the encoder and decoder are static as these are sharable
        pipeline.addLast(DECODER);
        pipeline.addLast(ENCODER);

        // and then business logic.
        pipeline.addLast(SERVER_HANDLER);
    }

Domain

Subdomains

Frequently Asked Questions

What does initChannel() do?
initChannel() is a function in the netty codebase, defined in example/src/main/java/io/netty/example/telnet/TelnetServerInitializer.java.
Where is initChannel() defined?
initChannel() is defined in example/src/main/java/io/netty/example/telnet/TelnetServerInitializer.java at line 43.

Analyze Your Own Codebase

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

Try Supermodel Free