This is the only way. Bye Norman
> On 22. Mar 2018, at 07:16, Rogan Dawes <[email protected]> wrote: > > 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] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/netty/565de195-007c-4b92-b077-2dad2fff8b5d%40googlegroups.com > > <https://groups.google.com/d/msgid/netty/565de195-007c-4b92-b077-2dad2fff8b5d%40googlegroups.com?utm_medium=email&utm_source=footer>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- 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/9BF027CC-C2C1-42F9-8B95-7E799D4957A4%40googlemail.com. For more options, visit https://groups.google.com/d/optout.
