It's safe, but you must update your channel store on user connection/disconnection.<br><br><div class="gmail_quote">On Sat, Sep 24, 2011 at 3:05 AM, irwinbilling <span dir="ltr"><<a href="mailto:irwin.billing@gmail.com">irwin.billing@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Is it safe to cache a channel object retrieved from<br>
ChannelStateEvent.getChannel() and write to it during other events or from<br>
other threads?<br>
<br>
For example, if one SimpleChannelUpstreamHandler receives a message and the<br>
logic requires that a message must be sent to another user (whose channel is<br>
cached by another SimpleChannelUpstreamHandler in a global store), is it<br>
safe to write to the second user's channel.<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Saving-Channel-object-tp6825727p6825727.html" target="_blank">http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Saving-Channel-object-tp6825727p6825727.html</a><br>
Sent from the Netty User Group mailing list archive at Nabble.com.<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>
</font></blockquote></div><br>