dev@grizzly.java.net

passing the IOException in ReadFilter to the Grizzly user

From: Harsha Godugu <Harsha.Godugu_at_Sun.COM>
Date: Mon, 03 Dec 2007 13:12:22 -0800

Hi Jeanfrancois,

How does Grizzly v1.6.0 handle the following scenario:
The underlying channel gets closed (unexpectedly, due to say some
network problem.. or loose contact etc.. and then backs up to live )
while reading data using ReadFilter. Consider this can happen on both
client and server side.

I see that, the ReadFilter class sets an attribute in Context, in case
of an exception. But that same attribute is removed in the
postExecute(..) method of ReadFilter. How does user of Grizzly know, if
there is an IO exception (ChannelClosedException..) while reading data
using the filter? Do we have state listeners of connection to monitor
connection state? (Similar to Controller state!)

Thanks,
Harsha