WebSocketServerInitializer Class — netty Architecture
Architecture documentation for the WebSocketServerInitializer class in WebSocketServerInitializer.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 2cbc6d43_858f_75f6_fefb_79edcd5fc047["WebSocketServerInitializer"] 83260e7c_a8fb_b128_a10a_416b8826874c["WebSocketServerInitializer.java"] 2cbc6d43_858f_75f6_fefb_79edcd5fc047 -->|defined in| 83260e7c_a8fb_b128_a10a_416b8826874c 3668bc05_3bfd_1a44_b073_7e80c2912508["WebSocketServerInitializer()"] 2cbc6d43_858f_75f6_fefb_79edcd5fc047 -->|method| 3668bc05_3bfd_1a44_b073_7e80c2912508 5902e570_f533_6567_30a5_75308b877b6a["initChannel()"] 2cbc6d43_858f_75f6_fefb_79edcd5fc047 -->|method| 5902e570_f533_6567_30a5_75308b877b6a
Relationship Graph
Source Code
example/src/main/java/io/netty/example/http/websocketx/benchmarkserver/WebSocketServerInitializer.java lines 27–47
public class WebSocketServerInitializer extends ChannelInitializer<SocketChannel> {
private static final int MAX_CONTENT_LENGTH = 65536;
private final SslContext sslCtx;
public WebSocketServerInitializer(SslContext sslCtx) {
this.sslCtx = sslCtx;
}
@Override
public void initChannel(SocketChannel ch) throws Exception {
ChannelPipeline pipeline = ch.pipeline();
if (sslCtx != null) {
pipeline.addLast(sslCtx.newHandler(ch.alloc()));
}
pipeline.addLast(new HttpServerCodec());
pipeline.addLast(new HttpObjectAggregator(MAX_CONTENT_LENGTH));
pipeline.addLast(new WebSocketServerHandler());
}
}
Source
Frequently Asked Questions
What is the WebSocketServerInitializer class?
WebSocketServerInitializer is a class in the netty codebase, defined in example/src/main/java/io/netty/example/http/websocketx/benchmarkserver/WebSocketServerInitializer.java.
Where is WebSocketServerInitializer defined?
WebSocketServerInitializer is defined in example/src/main/java/io/netty/example/http/websocketx/benchmarkserver/WebSocketServerInitializer.java at line 27.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free