1. How does netty determine the type of channelHandler
The AbstractChannelHandlerContext constructor needs to be passed in when it is inbound or outbound
2. What rules should be followed to add channelHandler
3. What is the difference between different triggering methods
pipeline initialization
The pipeline is created when the Channel is created. A channel corresponds to a pipeline object, and two head and tail nodes are created to form a doubly linked list.
The pipeline data structure ChannelHandlerContext, channelHandlerContext inherits AttributeMap and ChannelInboundInvoker and ChannelOutboundInvoker
The two sentinels of the pipeline, head and tail, tail pay attention to handling exceptions and unprocessed messages, which belong to inbound, head belongs to outbound, and focus on the channelActive method, mainly to propagate events and read and write operations.
Add and remove channelHandler
Determine whether to add repeatedly
Create a node and add a list
Callback add completion event
The spread of events and anomalies