为啥netty ChannelPipeline要设计成一条双链表

正好在看《Netty in Action》,有这么一段: Although we’ve been discussing decoders and encoders as distinct entities, you’ll
sometimes find it useful to manage transformations of both inbound and outbound
data and messages in one class. Netty’s abstract codec classes are useful for this pur-
pose, as each bundles together a decoder/encoder pair to handle both types of the
【为啥netty ChannelPipeline要设计成一条双链表】 operations we’ve been studying. As you might suspect, these classes implement both
ChannelInboundHandler and ChannelOutboundHandler.如果设置成两条链表,那么复杂性会大幅提高。

■网友
因为有同时关注 inBound和outBound的handler存在。


    推荐阅读