It&#39;s a static import.&nbsp; 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">&lt;<a href="mailto:excellencetechnologies08@gmail.com">excellencetechnologies08@gmail.com</a>&gt;</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 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ChannelPipelineFactory {<br>
41<br>
42 &nbsp; &nbsp; &nbsp;public ChannelPipeline getPipeline() throws Exception {<br>
43 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ChannelPipeline pipeline = pipeline();<br>
44<br>
45 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// Add the number codec first,<br>
46 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;pipeline.addLast(&quot;decoder&quot;, new BigIntegerDecoder());<br>
47 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;pipeline.addLast(&quot;encoder&quot;, new NumberEncoder());<br>
48<br>
49 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// and then business logic.<br>
50 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// Please note we create a handler for every new channel<br>
51 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// because it has stateful properties.<br>
52 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;pipeline.addLast(&quot;handler&quot;, new FactorialServerHandler());<br>
53<br>
54 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return pipeline;<br>
55 &nbsp; &nbsp; &nbsp;}<br>
56 &nbsp;}<br>
<div><div></div><div class="Wj3C7c"><br>
<br>
<br>
<br>
<br>
Trustin Lee-3 wrote:<br>
&gt;<br>
&gt; I&#39;m not sure I understood your question correctly, but here&#39;s my answer.<br>
&gt; :-)<br>
&gt;<br>
&gt; Even if you have specified ChannelPipelineCoverage as &quot;one&quot;, it doesn&#39;t<br>
&gt; necessarily mean that a new ChannelHandler instance will be created for<br>
&gt; each<br>
&gt; Channel automatically. &nbsp;You need to create it by yourself in your<br>
&gt; ChannelPipelineFactory. &nbsp;Please refer to the Factorial example:<br>
&gt;<br>
&gt; &nbsp; &nbsp;- <a href="http://tinyurl.com/6wgwtd" target="_blank">http://tinyurl.com/6wgwtd</a><br>
&gt;<br>
&gt; HTH,<br>
&gt; Trustin*<br>
&gt; *<br>
&gt; On Tue, Dec 30, 2008 at 8:26 PM, manish_iitg &lt;<br>
&gt; <a href="mailto:excellencetechnologies08@gmail.com">excellencetechnologies08@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; I have ChannelPipelineCoverage as &quot;one&quot; in my for my server handler. Even<br>
&gt;&gt; then after i close my connection from the client by called<br>
&gt;&gt; e.getChannl().close() and then after some time again start a connection<br>
&gt;&gt; by<br>
&gt;&gt; bind to the server, a new instance of server handler is not create.<br>
&gt;&gt; Please<br>
&gt;&gt; tell my what i am doing wrong. What i want is that, when a client<br>
&gt;&gt; connects<br>
&gt;&gt; to the server a new server handler should be created.<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Trustin Lee, Principal Software Engineer, JBoss, a division of Red Hat<br>
&gt; --<br>
&gt; what we call human nature in actuality is human habit<br>
&gt; --<br>
&gt; <a href="http://gleamynode.net/" target="_blank">http://gleamynode.net/</a><br>
&gt;<br>
</div></div><div class="Ih2E3d">&gt; _______________________________________________<br>
&gt; netty-users mailing list<br>
&gt; <a href="mailto:netty-users@lists.jboss.org">netty-users@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/netty-users" target="_blank">https://lists.jboss.org/mailman/listinfo/netty-users</a><br>
&gt;<br>
&gt;<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>