ChannelDuplexHandler Class — netty Architecture
Architecture documentation for the ChannelDuplexHandler class in ChannelDuplexHandler.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 73545c97_36ab_7694_969e_0f58a1882ed0["ChannelDuplexHandler"] 2021424a_336d_db98_b433_2d7978a1a02e["ChannelDuplexHandler.java"] 73545c97_36ab_7694_969e_0f58a1882ed0 -->|defined in| 2021424a_336d_db98_b433_2d7978a1a02e 23e4b857_ee17_884c_5191_6acb7b466b8d["bind()"] 73545c97_36ab_7694_969e_0f58a1882ed0 -->|method| 23e4b857_ee17_884c_5191_6acb7b466b8d 2d706585_86da_0655_4620_cdc874efd4db["connect()"] 73545c97_36ab_7694_969e_0f58a1882ed0 -->|method| 2d706585_86da_0655_4620_cdc874efd4db bc766194_7cdd_7623_3961_e2a863658bca["disconnect()"] 73545c97_36ab_7694_969e_0f58a1882ed0 -->|method| bc766194_7cdd_7623_3961_e2a863658bca 36da9b85_48fc_d219_898a_b3c1b4bcba6a["close()"] 73545c97_36ab_7694_969e_0f58a1882ed0 -->|method| 36da9b85_48fc_d219_898a_b3c1b4bcba6a c90924de_1c49_159f_46e8_a70ecaeb2af1["deregister()"] 73545c97_36ab_7694_969e_0f58a1882ed0 -->|method| c90924de_1c49_159f_46e8_a70ecaeb2af1 ee1c5734_dd89_e4ff_6888_0f01ddb8a62b["read()"] 73545c97_36ab_7694_969e_0f58a1882ed0 -->|method| ee1c5734_dd89_e4ff_6888_0f01ddb8a62b 6cd3b75d_33a7_64f7_b553_0b889fe931c1["write()"] 73545c97_36ab_7694_969e_0f58a1882ed0 -->|method| 6cd3b75d_33a7_64f7_b553_0b889fe931c1 748207c4_c7b0_41af_c722_036d0eba604d["flush()"] 73545c97_36ab_7694_969e_0f58a1882ed0 -->|method| 748207c4_c7b0_41af_c722_036d0eba604d
Relationship Graph
Source Code
transport/src/main/java/io/netty/channel/ChannelDuplexHandler.java lines 29–129
public class ChannelDuplexHandler extends ChannelInboundHandlerAdapter implements ChannelOutboundHandler {
/**
* Calls {@link ChannelHandlerContext#bind(SocketAddress, ChannelPromise)} to forward
* to the next {@link ChannelOutboundHandler} in the {@link ChannelPipeline}.
*
* Sub-classes may override this method to change behavior.
*/
@Skip
@Override
public void bind(ChannelHandlerContext ctx, SocketAddress localAddress,
ChannelPromise promise) throws Exception {
ctx.bind(localAddress, promise);
}
/**
* Calls {@link ChannelHandlerContext#connect(SocketAddress, SocketAddress, ChannelPromise)} to forward
* to the next {@link ChannelOutboundHandler} in the {@link ChannelPipeline}.
*
* Sub-classes may override this method to change behavior.
*/
@Skip
@Override
public void connect(ChannelHandlerContext ctx, SocketAddress remoteAddress,
SocketAddress localAddress, ChannelPromise promise) throws Exception {
ctx.connect(remoteAddress, localAddress, promise);
}
/**
* Calls {@link ChannelHandlerContext#disconnect(ChannelPromise)} to forward
* to the next {@link ChannelOutboundHandler} in the {@link ChannelPipeline}.
*
* Sub-classes may override this method to change behavior.
*/
@Skip
@Override
public void disconnect(ChannelHandlerContext ctx, ChannelPromise promise)
throws Exception {
ctx.disconnect(promise);
}
/**
* Calls {@link ChannelHandlerContext#close(ChannelPromise)} to forward
* to the next {@link ChannelOutboundHandler} in the {@link ChannelPipeline}.
*
* Sub-classes may override this method to change behavior.
*/
@Skip
@Override
public void close(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception {
ctx.close(promise);
}
/**
* Calls {@link ChannelHandlerContext#deregister(ChannelPromise)} to forward
* to the next {@link ChannelOutboundHandler} in the {@link ChannelPipeline}.
*
* Sub-classes may override this method to change behavior.
*/
@Skip
@Override
public void deregister(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception {
ctx.deregister(promise);
}
/**
* Calls {@link ChannelHandlerContext#read()} to forward
* to the next {@link ChannelOutboundHandler} in the {@link ChannelPipeline}.
*
* Sub-classes may override this method to change behavior.
*/
@Skip
@Override
public void read(ChannelHandlerContext ctx) throws Exception {
ctx.read();
}
/**
* Calls {@link ChannelHandlerContext#write(Object, ChannelPromise)} to forward
* to the next {@link ChannelOutboundHandler} in the {@link ChannelPipeline}.
*
Source
Frequently Asked Questions
What is the ChannelDuplexHandler class?
ChannelDuplexHandler is a class in the netty codebase, defined in transport/src/main/java/io/netty/channel/ChannelDuplexHandler.java.
Where is ChannelDuplexHandler defined?
ChannelDuplexHandler is defined in transport/src/main/java/io/netty/channel/ChannelDuplexHandler.java at line 29.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free