Does AsynchronousSocketChannel.read(ByteBuffer) throw ShutdownChannelGroupException?
Alan Bateman
Alan.Bateman at Sun.COM
Thu Jun 25 07:34:05 PDT 2009
cowwoc wrote:
> :
> I'm confused. If shutdownNow() causes outstanding operations to
> throw AsynchronousCloseException when does
> ShutdownChannelGroupException get thrown?
If you look at the open methods you will see that they are specified to
throw ShutdownChannelGroupException if you attempt to open a channel in
a group that is shutdown.
Also, the I/O methods where you specify a completion handler, and
attempt to initiate an I/O operation on a channel in a group that has
terminated. This case has to fail with the initiating thread throwing an
exception (because the completion handler cannot be invoked).
-Alan.
More information about the nio-discuss
mailing list