How to use channel groups from custom implementation?
Alan Bateman
Alan.Bateman at oracle.com
Tue Jul 19 10:44:31 PDT 2011
Gili wrote:
> :
> I think you meant "does *not* specify that it can be null". Okay, so we'd
> need to update the documentation there. Can you open a bug report for this?
>
> PS: Why does AsynchronousChannelGroup even need a reference to the provider?
> This sounds like an implementation detail...?
>
>
An AsynchronousChannelGroup is intimately bound to its provider and the
asynchronous channels that the provider creates. It's similar to a
Selector being intimately bound to its provider and the selectable
channels that the SelectorProvider creates. On a few occasions there has
been requests for a way to create a selectable channel implementation
and have it work with the default Selector implementation but we just
don't have a good story for that (because it involves
platform/implementation specific plumbing). It's the same thing with an
AsynchronousChannelGroup. If AsynchronousChannelGroup is useful to what
you are doing then creating it with the provider with null should be okay.
-Alan.
More information about the nio-discuss
mailing list