[PATCH] DefaultSocketImplFactory
Roman Kennke
roman.kennke at aicas.com
Mon Mar 10 12:23:04 PDT 2008
Hi,
I'm trying to port the network code to the JamaicaVM. It appears that
the PlainSocketImpl (or its subclass SocksSocketImpl) that is used by
default in java.net.Socket is not really feasible to use as SocketImpl,
and I would rather be able to choose different implementations for some
platforms. However, the choice of SocksSocketImpl is hardwired in the
Socket class. I propose to do something similar as in DatagramSocket and
InetAddress, and choose the implementation based on the property
impl.prefix, using a factory class.
The exact name of the property might be different though, otherwise we
might introduce a small incompatibility, when somebody uses the
impl.prefix property (or is it used internally? that would be even
worse) then he would now also have to provide a SocketImpl for that
prefix. Maybe we should choose 'socketimpl.prefix' then?
What do you think, is such a change feasible? It would certainly make my
life a lot easier.
Cheers, Roman
--
Dipl.-Inform. (FH) Roman Kennke, Software Engineer, http://kennke.org
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com * Tel: +49-721-663 968-0
USt-Id: DE216375633, Handelsregister HRB 109481, AG Karlsruhe
Geschäftsführer: Dr. James J. Hunt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openjdk-defaultsocketimplfactory.patch
Type: text/x-patch
Size: 3638 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/net-dev/attachments/20080310/4e86a74c/openjdk-defaultsocketimplfactory.patch
More information about the net-dev
mailing list