Hi,

When writing my ChannelInitializers, I try not to assume that I am the only 
ChannelInitializer in the pipeline. In other words, using constructs like 
ch.pipeline().addFirst() and addLast() may be detrimental, if there are 
other handlers already added to the pipeline.

My approach is currently to do:

@Override
protected void initChannel(SocketChannel ch) throws Exception {
ChannelPipeline p = ch.pipeline();
String me = p.context(this).name();
p.addAfter(me, null, handler);
                }

is there a better way to find precisely where this ChannelInitializer is in 
the pipeline, and add its handlers strictly after itself, but before any 
other handlers that may already be in the pipeline?

Thanks

Rogan

-- 
You received this message because you are subscribed to the Google Groups 
"Netty discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/netty/565de195-007c-4b92-b077-2dad2fff8b5d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to