Netty Server Shutdown

Johnny Luong johnny.luong at trustcommerce.com
Mon Mar 1 17:31:52 EST 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

B.L. Zeebub wrote:
| Hi
|
| Which events should I be capturing at my Netty client to detect
|
| a) An orderly shutdown of the Netty server - I'm guessing ChannelClosed()?
|
| b) Sudden and unexpected death of the Netty server? The problem here
is that
| I'm implementing a comet-like binary protocol. The client connects to the
| server and waits for a server response to initiate processing. If the
server
| dies before sending a response, is there anyway for the client to be
able to
| detect this or am I going to have to implement some sort of pollling?
|
| Regards

a) You could probably capture this by either implementing an application
level shutdown (for your protocol) or overriding the method you
suggested.  Maybe channelDisconnected() would work as well.

b) You could implement the IdleStateHandler to monitor your connection
for activity and make a determination as to whether to shut the
connection down...

Best,
Johnny
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkuMQFgACgkQnQTBLXttTeXIZwCfXV1FzliXtL7vpQ0lIXo8Ajga
7tAAnjN/SmBcU3BosT8q+fKwF9M2Krag
=liFF
-----END PGP SIGNATURE-----


More information about the netty-users mailing list