RFC: Socket VM interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there,

I am not happy with the current situation wrt to the Socket related VM
interface. AFAICS, we have three layers of abstraction here:
- On API level we have the Socket/SocketImpl/SocketImplFactory stuff.
- Below this we have PlainSocketImpl and VMPlainSocketImpl et al.
- On the native side there is some kind of target layer too.

At least one of these layers seems superfluous. The VMSocketImpl class
seems to mostly map the methods from the SocketImpl class again.

Are there any objections to boiling down the VM interface to something
like:

class VMSockets
{
  SocketImplFactory getSocketImplFactory();
  DatagramSocketImplFactory getDatagramSocketImplFactory();
}

For some time of transition this could return the PlainSocketImpl
together with the VMPlainSocketBlah stuff. And in the long run the
VMPlainSocket stuff would be re-merged into PlainSocketImpl.

I know that I am (at least partly) responsible for this shit in the
first place and I feel sorry for that :-/

BTW, there are similar double-abstractions in other areas too, i.e. NIO
(where most classes are abstract anyway).

/Roman




[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux