Netty source read the Getting Started combat (six) -pipeline

1 pipeline Overview


2 pipeline initialization





Doubly linked list structure



See in which a class that implements

basic data structures assembly






3 Add ChannelHandler

Take a look at the user code





















Custom user side can achieve

6 outBound dissemination events



















After the process of empathy

7 anomalous propagation









It corresponds to the case of tail current node

Best Practices
In the last defined exception handler, otherwise the default print a warning message tail node
All exceptions final disposal location

8 pipeline summary



When calling pipeline to add nodes, netty will use the instanceof keyword to determine the current node is inboound or outbound types were identified by different types of boolean variable

inbound event type sequence was positively correlated
outbound inverse correlation

exception handler began to spread from either head or tail node
inbound event start passing from the current node to the last node of
the first node outbound outbound events from the current node starts to transmit

Guess you like

Origin yq.aliyun.com/articles/704677