在TransportClientFactory的createClient
,TransportServer中的init
方法,都会用到TransportContext#initializePipeline
方法
1 | //被TransportClientFactory#createClient调用 |
compoment | implements |
---|---|
TransportFrameDecoder | ChannelInboundHandler |
MessageDecoder | ChannelInboundHandler |
IdleStateHandler | ChannelInboundHandler |
TransportChannelHandler | ChannelInboundHandler |
MessageEncoder | ChannelOutboundHandler |
在netty中,ChannelInboundHandler
按注册的先后顺序来、ChannelOutboundHandler
按注册的先后逆序来