Home / Class/ StompWebSocketChatServerInitializer Class — netty Architecture

StompWebSocketChatServerInitializer Class — netty Architecture

Architecture documentation for the StompWebSocketChatServerInitializer class in StompWebSocketChatServerInitializer.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  6b934e49_04de_1a27_683d_c30ca90bf6b6["StompWebSocketChatServerInitializer"]
  6085d2a3_8a14_ed86_0c12_430e588d0f2a["StompWebSocketChatServerInitializer.java"]
  6b934e49_04de_1a27_683d_c30ca90bf6b6 -->|defined in| 6085d2a3_8a14_ed86_0c12_430e588d0f2a
  7e899e58_6fd1_ad15_8f5e_79e8169fab42["StompWebSocketChatServerInitializer()"]
  6b934e49_04de_1a27_683d_c30ca90bf6b6 -->|method| 7e899e58_6fd1_ad15_8f5e_79e8169fab42
  d0697b2e_8a78_b4f4_53be_966bf218072f["initChannel()"]
  6b934e49_04de_1a27_683d_c30ca90bf6b6 -->|method| d0697b2e_8a78_b4f4_53be_966bf218072f

Relationship Graph

Source Code

example/src/main/java/io/netty/example/stomp/websocket/StompWebSocketChatServerInitializer.java lines 25–44

public class StompWebSocketChatServerInitializer extends ChannelInitializer<SocketChannel> {

    private final String chatPath;
    private final StompWebSocketProtocolCodec stompWebSocketProtocolCodec;

    public StompWebSocketChatServerInitializer(String chatPath) {
        this.chatPath = ObjectUtil.checkNotNull(chatPath, "chatPath");
        stompWebSocketProtocolCodec = new StompWebSocketProtocolCodec();
    }

    @Override
    protected void initChannel(SocketChannel channel) throws Exception {
        channel.pipeline()
               .addLast(new HttpServerCodec())
               .addLast(new HttpObjectAggregator(65536))
               .addLast(StompWebSocketClientPageHandler.INSTANCE)
               .addLast(new WebSocketServerProtocolHandler(chatPath, StompVersion.SUB_PROTOCOLS))
               .addLast(stompWebSocketProtocolCodec);
    }
}

Frequently Asked Questions

What is the StompWebSocketChatServerInitializer class?
StompWebSocketChatServerInitializer is a class in the netty codebase, defined in example/src/main/java/io/netty/example/stomp/websocket/StompWebSocketChatServerInitializer.java.
Where is StompWebSocketChatServerInitializer defined?
StompWebSocketChatServerInitializer is defined in example/src/main/java/io/netty/example/stomp/websocket/StompWebSocketChatServerInitializer.java at line 25.

Analyze Your Own Codebase

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

Try Supermodel Free