On that topic, is there a VCS from which netty can be downloaded?<div><br></div><div>MD</div><div><br><br><div class="gmail_quote">On Mon, Oct 24, 2011 at 10:37 PM, Matt DeLuco <span dir="ltr">&lt;<a href="mailto:list_usr@spacebox.net">list_usr@spacebox.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Thank you, Norman!<div><br></div><div>I have to say though, this all seems like a very roundabout way of keeping track of session data for a Channel.</div>
<div><br></div><div>Is there any interest in adding a session interface to HttpRequest, something like javax.servlet.http.HttpSession found in javax.servlet.http.HttpRequest?</div>
<div><br></div><div>I thought if there was an interface one could implement the storage mechanism - file/database/memcached, etc.</div><div><br></div><font color="#888888"><div>MD</div></font><div><div></div><div class="h5">
<div><br><br><div class="gmail_quote">On Mon, Oct 24, 2011 at 6:16 AM, Norman Maurer <span dir="ltr">&lt;<a href="mailto:norman.maurer@googlemail.com" target="_blank">norman.maurer@googlemail.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi there,<br>
<br>
just to follow up. I committed some code to handle the removal without<br>
user interaction:<br>
<br>
<a href="https://issues.jboss.org/browse/NETTY-447?page=com.atlassian.jirafisheyeplugin:fisheye-issuepanel#issue-tabs" target="_blank">https://issues.jboss.org/browse/NETTY-447?page=com.atlassian.jirafisheyeplugin:fisheye-issuepanel#issue-tabs</a><br>



<br>
So it will be in the next release...<br>
<br>
Bye<br>
Norman<br>
<br>
2011/10/24 Norman Maurer &lt;<a href="mailto:norman.maurer@googlemail.com" target="_blank">norman.maurer@googlemail.com</a>&gt;:<br>
<div><div></div><div>&gt; Hi Matt,<br>
&gt;<br>
&gt; comments inline..<br>
&gt;<br>
&gt; 2011/10/24 Matt DeLuco &lt;<a href="mailto:list_usr@spacebox.net" target="_blank">list_usr@spacebox.net</a>&gt;:<br>
&gt;&gt; I found what I was looking for - a brief example of ChannelLocal is found in<br>
&gt;&gt; the ChannelHandler documentation (ps: it might be worth repeating in the<br>
&gt;&gt; ChannelLocal docs..)  But now I&#39;m wondering:<br>
&gt;&gt; The example shows a DataServerState class - where would that class be<br>
&gt;&gt; instantiated such that all handlers have access to it?  I thought I might<br>
&gt;&gt; instantiate it in my server startup code, pass it to the<br>
&gt;&gt; ChannelPipelineFactory where I could pass it on to the constructor of each<br>
&gt;&gt; ChannelHandler.  Is there another way?<br>
&gt;<br>
&gt; I think thats the easiest way and should work very well.<br>
&gt;<br>
&gt;&gt; Also, at some point before the Channel closes would I have to be sure to<br>
&gt;&gt; remove any ChannelLocal variable references?  That is, ChannelLocals map<br>
&gt;&gt; values to Channels, so would I have to be sure to remove each reference so<br>
&gt;&gt; values to closed Channels don&#39;t pile up, creating a memory leak?  If so,<br>
&gt;&gt; how/where could I attach an event handler to a Channel to do this?  Would I<br>
&gt;&gt; have to do this in a ChannelHandler (I don&#39;t like that idea, because which<br>
&gt;&gt; ChannelHandler do I put it in?) or create some kind of custom<br>
&gt;&gt; ChannelFactory?<br>
&gt;<br>
&gt; Just add an SimpleUpstreamChannelHandler and override the<br>
&gt; channelClosed(..) method. There you can remove it.<br>
&gt; I think it would also be nice to allow the ChannelLocal to cleanup it<br>
&gt; self by register and ChannelListener to it that takes care of the<br>
&gt; remove and so prevent the leak. I will open a jira issue for it and<br>
&gt; implement it.<br>
&gt;<br>
&gt;<br>
&gt;&gt; Thanks.<br>
&gt;&gt; MD<br>
&gt;&gt;<br>
&gt;&gt; On Fri, Oct 21, 2011 at 3:36 AM, Norman Maurer<br>
&gt;&gt; &lt;<a href="mailto:norman.maurer@googlemail.com" target="_blank">norman.maurer@googlemail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I was using it before in a project but remoted it in favor of<br>
&gt;&gt;&gt; ChannelHandlerContext.setAttachment(..).<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; But it worked quited fine for me. You can see the old code here:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; <a href="http://svn.apache.org/viewvc/james/protocols/tags/protocols-1.5/impl/src/main/java/org/apache/james/protocols/impl/AbstractChannelUpstreamHandler.java?view=markup" target="_blank">http://svn.apache.org/viewvc/james/protocols/tags/protocols-1.5/impl/src/main/java/org/apache/james/protocols/impl/AbstractChannelUpstreamHandler.java?view=markup</a><br>



&gt;&gt;&gt;<br>
&gt;&gt;&gt; Bye,<br>
&gt;&gt;&gt; Norman<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Ps: What does not work for you ?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; 2011/10/21 Matt DeLuco &lt;<a href="mailto:list_usr@spacebox.net" target="_blank">list_usr@spacebox.net</a>&gt;:<br>
&gt;&gt;&gt; &gt; Where can I find some examples of ChannelLocal in use?<br>
&gt;&gt;&gt; &gt; I&#39;m not getting the results I expect, but I don&#39;t think I&#39;m using it<br>
&gt;&gt;&gt; &gt; correctly either.<br>
&gt;&gt;&gt; &gt; MD<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; On Sun, Oct 16, 2011 at 7:14 AM, Norman Maurer<br>
&gt;&gt;&gt; &gt; &lt;<a href="mailto:norman.maurer@googlemail.com" target="_blank">norman.maurer@googlemail.com</a>&gt; wrote:<br>
&gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; You can set anything you want as attachment. But it&#39;s only visible in<br>
&gt;&gt;&gt; &gt;&gt; the same handler....<br>
&gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; If you want to share stuff between handler you should checkout<br>
&gt;&gt;&gt; &gt;&gt; ChannelLocal<br>
&gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; Bye<br>
&gt;&gt;&gt; &gt;&gt; Norman<br>
&gt;&gt;&gt; &gt;&gt; 2011/10/16, Matt DeLuco &lt;<a href="mailto:list_usr@spacebox.net" target="_blank">list_usr@spacebox.net</a>&gt;:<br>
&gt;&gt;&gt; &gt;&gt; &gt; Before composing this message I had noticed<br>
&gt;&gt;&gt; &gt;&gt; &gt; ChannelHandlerContext.setAttachment(Object) and getAttachment().  But<br>
&gt;&gt;&gt; &gt;&gt; &gt; for some reason I came to the conclusion that it wasn&#39;t intended for<br>
&gt;&gt;&gt; &gt;&gt; &gt; what I want to do.<br>
&gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt; I came to that conclusion in part because I found it strange that<br>
&gt;&gt;&gt; &gt;&gt; &gt; it&#39;s<br>
&gt;&gt;&gt; &gt;&gt; &gt; only possible to set one attachment, rather than being able to attach<br>
&gt;&gt;&gt; &gt;&gt; &gt; a set (or map) of objects.  Could I just attach a map to the context<br>
&gt;&gt;&gt; &gt;&gt; &gt; and store whatever I want in that map, to pass objects between<br>
&gt;&gt;&gt; &gt;&gt; &gt; ChannelHandlers?<br>
&gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt; MD<br>
&gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt; On Sat, Oct 15, 2011 at 9:42 PM, Matt DeLuco &lt;<a href="mailto:list_usr@spacebox.net" target="_blank">list_usr@spacebox.net</a>&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt; wrote:<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt; Is it possible to pass data between ChannelHandlers, or store data<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt; somewhere that the handlers in a specific pipeline/channel can<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt; access<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt; throughout the lifetime of the request?<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt; For example, I have my own class for dealing with http cookies,<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt; &quot;CookieMap&quot;.  I&#39;d like to have a SimpleChannelHandler that creates a<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt; CookieMap to be used by handlers further upstream, and then sets the<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt; cookies in the CookieMap on the response on their way back<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt; downstream.<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt; MD<br>
&gt;&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;&gt; &gt; _______________________________________________<br>
&gt;&gt;&gt; &gt;&gt; &gt; netty-users mailing list<br>
&gt;&gt;&gt; &gt;&gt; &gt; <a href="mailto:netty-users@lists.jboss.org" target="_blank">netty-users@lists.jboss.org</a><br>
&gt;&gt;&gt; &gt;&gt; &gt; <a href="https://lists.jboss.org/mailman/listinfo/netty-users" target="_blank">https://lists.jboss.org/mailman/listinfo/netty-users</a><br>
&gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; &gt;&gt; netty-users mailing list<br>
&gt;&gt;&gt; &gt;&gt; <a href="mailto:netty-users@lists.jboss.org" target="_blank">netty-users@lists.jboss.org</a><br>
&gt;&gt;&gt; &gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/netty-users" target="_blank">https://lists.jboss.org/mailman/listinfo/netty-users</a><br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;<br>
&gt;<br>
&gt; Bye,<br>
&gt; Norman<br>
&gt;<br>
<br>
_______________________________________________<br>
netty-users mailing list<br>
<a href="mailto:netty-users@lists.jboss.org" target="_blank">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>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>