SimpleChannelHander query

Trustin Lee trustin at gleamynode.net
Wed Dec 31 11:41:43 EST 2008


It's a static import.  See Channels.pipeline()

— Trustin Lee, http://gleamynode.net/


On Thu, Jan 1, 2009 at 1:17 AM, manish_iitg <
excellencetechnologies08 at gmail.com> wrote:

>
> In the below code, from the netty examples.
> In line 43 it calls a funciton pipeline();
> what function is this and in which class is this defined.
>
>
> public class FactorialServerPipelineFactory implements
> 40          ChannelPipelineFactory {
> 41
> 42      public ChannelPipeline getPipeline() throws Exception {
> 43          ChannelPipeline pipeline = pipeline();
> 44
> 45          // Add the number codec first,
> 46          pipeline.addLast("decoder", new BigIntegerDecoder());
> 47          pipeline.addLast("encoder", new NumberEncoder());
> 48
> 49          // and then business logic.
> 50          // Please note we create a handler for every new channel
> 51          // because it has stateful properties.
> 52          pipeline.addLast("handler", new FactorialServerHandler());
> 53
> 54          return pipeline;
> 55      }
> 56  }
>
>
>
>
>
> Trustin Lee-3 wrote:
> >
> > I'm not sure I understood your question correctly, but here's my answer.
> > :-)
> >
> > Even if you have specified ChannelPipelineCoverage as "one", it doesn't
> > necessarily mean that a new ChannelHandler instance will be created for
> > each
> > Channel automatically.  You need to create it by yourself in your
> > ChannelPipelineFactory.  Please refer to the Factorial example:
> >
> >    - http://tinyurl.com/6wgwtd
> >
> > HTH,
> > Trustin*
> > *
> > On Tue, Dec 30, 2008 at 8:26 PM, manish_iitg <
> > excellencetechnologies08 at gmail.com> wrote:
> >
> >> I have ChannelPipelineCoverage as "one" in my for my server handler.
> Even
> >> then after i close my connection from the client by called
> >> e.getChannl().close() and then after some time again start a connection
> >> by
> >> bind to the server, a new instance of server handler is not create.
> >> Please
> >> tell my what i am doing wrong. What i want is that, when a client
> >> connects
> >> to the server a new server handler should be created.
> >
> >
> > --
> > Trustin Lee, Principal Software Engineer, JBoss, a division of Red Hat
> > --
> > what we call human nature in actuality is human habit
> > --
> > http://gleamynode.net/
> >
> > _______________________________________________
> > netty-users mailing list
> > netty-users at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/netty-users
> >
> >
>
> --
> View this message in context:
> http://n2.nabble.com/SimpleChannelHander-query-tp2092051p2096456.html
> Sent from the Netty User Group mailing list archive at Nabble.com.
>
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/netty-users/attachments/20090101/63798a4d/attachment.html 


More information about the netty-users mailing list