Do you understand the relationship between ChannelHandler, ChannelHandlerContext and ChannelPipeline?

TW theodore.wu at ngc.com
Wed Jan 20 19:35:53 EST 2010


I'm still a little unclear on what a ChannelHandlerContext is used for.  Is
it simply the interface by which a Handler interacts with its pipeline and
other handlers? Is this why it's a parameter in the downstream/upstream
handler interface? My reasoning thus far is that there could be cases where
handlers need to pass additional data between each other and not just the
event.  beyond the attachment though, what does a context really tell one
handler about the other?  

I can see how if you had the same instance of a handler in different
pipelines you would have a separate context for each occurrence of the
handler.  each occurrence exists in a different pipeline and thus has a
different context within that pipeline.
-- 
View this message in context: http://n2.nabble.com/Do-you-understand-the-relationship-between-ChannelHandler-ChannelHandlerContext-and-ChannelPipeline-tp2737237p4430715.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list