David M. Lloyd wrote:
> I am also interested (as are others at Red Hat) - and I hope the API
> also supports multiple independent streams. It's a shame that this
> work is not open - or is it (dev.java.net somewhere perhaps)?
The SCTP API that I mentioned can't exist as a standalone project at
this time because the channels need to register with the default
Selector. I don't know how familiar you are with the channels API but
it's not currently possible to define (in a supported manner) a new
selectable channel type and have it work with a Selector without hooks
into its implementation. The unit of replacement at this time is the
selector provider or the whole ball of wax that is the Selector and each
of the selectable channel types. A plugin mechanism is desirable but not
clear that a completely portable mechanism is possible because it's at
the level of being able to multiplex over a set of file descriptors or
handles that work with the polling facility used by the Selector
implementation. If we limit defining the interface for a particular
provider and operating system then it becomes simpler to define and we
are interested in doing this for OpenJDK/jdk7. We actually have the
basis for this already and it just needs a big of clean-up (and
documentation). Anyway, with a supported interface exposed then it will
allow others to develop their own selectable channels that work with the
default selector provider. SCTP is a good candidate for this because its
multi-homing and multi-streaming features don't fit well with channels
that Java SE defines today. I'm getting slight off-topic here but the
second part to adding support for other protocols is that sometimes it
is desirable to use the existing socket channel API rather than defining
a new selectable channel type (Unix domain sockets is a good example).
To address this we also hope (and have prototyped) updates to the socket
channel API to allow the protocol be specified when creating the
channel. If you are interested in the details then it may be better to
move this discussion to the core-libs-dev mailing list [1]. Finally, for
SCTP I would suggest contacting Christopher Hegarty as he has the details.
-Alan.
[1] core-libs-...@openjdk.java.net