As introduced in Netty New and noteworthy in 4.0:
channelOpen, channelBound, and channelConnected have been merged to channelActive. channelDisconnected, channelUnbound, and channelClosed have been merged to channelInactive. Likewise, Channel.isBound() and isConnected() have been merged to isActive().
Note that channelRegistered and channelUnregistered are not equivalent to channelOpen and channelClosed. They are new states introduced to support dynamic registration, deregistration, and re-registration of a Channel, as illustrated below:
IMHO, in scenario of TCP/IP, when a channel is unregistered, the corresponding socket is closed, how could it be re-register
again?
When you deregister a Channel it basically removed itself from the servicing Thread which in the case of NIO also is the Selector itself. This means you will not get notified on any event changes. Once you register again the Channel will be registered on a Selector again and you will get noticed about events (like OP_READ, OP_WRITE etc).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With