Home / Class/ StompClient Class — netty Architecture

StompClient Class — netty Architecture

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

Entity Profile

Dependency Diagram

graph TD
  6d8b175f_1755_1cfd_f6e0_8612f6bbeede["StompClient"]
  6a5dffd7_0852_08ca_2df3_3017bdf28b38["StompClient.java"]
  6d8b175f_1755_1cfd_f6e0_8612f6bbeede -->|defined in| 6a5dffd7_0852_08ca_2df3_3017bdf28b38
  dd01f289_6a13_e4e4_deac_99962881a2a2["main()"]
  6d8b175f_1755_1cfd_f6e0_8612f6bbeede -->|method| dd01f289_6a13_e4e4_deac_99962881a2a2

Relationship Graph

Source Code

example/src/main/java/io/netty/example/stomp/StompClient.java lines 35–65

public final class StompClient {

    static final boolean SSL = System.getProperty("ssl") != null;
    static final String HOST = System.getProperty("host", "127.0.0.1");
    static final int PORT = Integer.parseInt(System.getProperty("port", "61613"));
    static final String LOGIN = System.getProperty("login", "guest");
    static final String PASSCODE = System.getProperty("passcode", "guest");
    static final String TOPIC = System.getProperty("topic", "jms.topic.exampleTopic");

    public static void main(String[] args) throws Exception {
        EventLoopGroup group = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
        try {
            Bootstrap b = new Bootstrap();
            b.group(group).channel(NioSocketChannel.class);
            b.handler(new ChannelInitializer<SocketChannel>() {
                @Override
                protected void initChannel(SocketChannel ch) throws Exception {
                    ChannelPipeline pipeline = ch.pipeline();
                    pipeline.addLast("decoder", new StompSubframeDecoder());
                    pipeline.addLast("encoder", new StompSubframeEncoder());
                    pipeline.addLast("aggregator", new StompSubframeAggregator(1048576));
                    pipeline.addLast("handler", new StompClientHandler());
                }
            });

            b.connect(HOST, PORT).sync().channel().closeFuture().sync();
        } finally {
            group.shutdownGracefully();
        }
    }
}

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free