It's a static import. See Channels.pipeline()<br clear="all"><br>— Trustin Lee, <a href="http://gleamynode.net/">http://gleamynode.net/</a><br>
<br><br><div class="gmail_quote">On Thu, Jan 1, 2009 at 1:17 AM, manish_iitg <span dir="ltr"><<a href="mailto:excellencetechnologies08@gmail.com">excellencetechnologies08@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
In the below code, from the netty examples.<br>
In line 43 it calls a funciton pipeline();<br>
what function is this and in which class is this defined.<br>
<br>
<br>
public class FactorialServerPipelineFactory implements<br>
40 ChannelPipelineFactory {<br>
41<br>
42 public ChannelPipeline getPipeline() throws Exception {<br>
43 ChannelPipeline pipeline = pipeline();<br>
44<br>
45 // Add the number codec first,<br>
46 pipeline.addLast("decoder", new BigIntegerDecoder());<br>
47 pipeline.addLast("encoder", new NumberEncoder());<br>
48<br>
49 // and then business logic.<br>
50 // Please note we create a handler for every new channel<br>
51 // because it has stateful properties.<br>
52 pipeline.addLast("handler", new FactorialServerHandler());<br>
53<br>
54 return pipeline;<br>
55 }<br>
56 }<br>
<div><div></div><div class="Wj3C7c"><br>
<br>
<br>
<br>
<br>
Trustin Lee-3 wrote:<br>
><br>
> I'm not sure I understood your question correctly, but here's my answer.<br>
> :-)<br>
><br>
> Even if you have specified ChannelPipelineCoverage as "one", it doesn't<br>
> necessarily mean that a new ChannelHandler instance will be created for<br>
> each<br>
> Channel automatically. You need to create it by yourself in your<br>
> ChannelPipelineFactory. Please refer to the Factorial example:<br>
><br>
> - <a href="http://tinyurl.com/6wgwtd" target="_blank">http://tinyurl.com/6wgwtd</a><br>
><br>
> HTH,<br>
> Trustin*<br>
> *<br>
> On Tue, Dec 30, 2008 at 8:26 PM, manish_iitg <<br>
> <a href="mailto:excellencetechnologies08@gmail.com">excellencetechnologies08@gmail.com</a>> wrote:<br>
><br>
>> I have ChannelPipelineCoverage as "one" in my for my server handler. Even<br>
>> then after i close my connection from the client by called<br>
>> e.getChannl().close() and then after some time again start a connection<br>
>> by<br>
>> bind to the server, a new instance of server handler is not create.<br>
>> Please<br>
>> tell my what i am doing wrong. What i want is that, when a client<br>
>> connects<br>
>> to the server a new server handler should be created.<br>
><br>
><br>
> --<br>
> Trustin Lee, Principal Software Engineer, JBoss, a division of Red Hat<br>
> --<br>
> what we call human nature in actuality is human habit<br>
> --<br>
> <a href="http://gleamynode.net/" target="_blank">http://gleamynode.net/</a><br>
><br>
</div></div><div class="Ih2E3d">> _______________________________________________<br>
> netty-users mailing list<br>
> <a href="mailto:netty-users@lists.jboss.org">netty-users@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/netty-users" target="_blank">https://lists.jboss.org/mailman/listinfo/netty-users</a><br>
><br>
><br>
<br>
</div><font color="#888888">--<br>
View this message in context: <a href="http://n2.nabble.com/SimpleChannelHander-query-tp2092051p2096456.html" target="_blank">http://n2.nabble.com/SimpleChannelHander-query-tp2092051p2096456.html</a><br>
</font><div><div></div><div class="Wj3C7c">Sent from the Netty User Group mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
netty-users mailing list<br>
<a href="mailto:netty-users@lists.jboss.org">netty-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/netty-users" target="_blank">https://lists.jboss.org/mailman/listinfo/netty-users</a><br>
<br>
</div></div></blockquote></div><br>