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