Order of events (and last event)

"이희승 (Trustin Lee)" trustin at gmail.com
Tue Nov 9 05:40:59 EST 2010


I'd simply use Channel.isOpen();

  void channelClosed(...) {
    performLastAction();
  }

  void exceptionCaught(...) {
    if (channel.isOpen()) {
      // log and do something;
    } else {
      // just log and do nothing more.
    }
  }

valodzka wrote:
> I'm trying to add some final action at the end of data processing (on
> channelClosed). 
> The problem that when exception occurs at opening channel channelClose
> called before exceptionCaught. Are there any way make channelClosed called
> after all or may be there are some other event/flag that I can use to do
> final action? 

-- 
Trustin Lee - http://gleamynode.net/


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 290 bytes
Desc: OpenPGP digital signature
Url : http://lists.jboss.org/pipermail/netty-users/attachments/20101109/07c8b3aa/attachment.bin 


More information about the netty-users mailing list