I've been doing a refactoring of our remoting layer.
I've made a lot of changes and simplifications and I've separated out all our core and generic remoting code - this code has no dependencies on any particular transport implementation e.g. MINA.
I have also created a service provider interface package (spi), in a similar way you get JDBC spi, JTA spi etc This is a set of classes which define the contract between out remoting code and the transport itself (e.g. MINA).
Basically, to integrate a particular transport provider you need to implement a set of classes which are then used by our remoting code:
This are simple interfaces since the bulk of the code has been moved to the core remoting code which is the same for all transport providers.
There are methods on RemotingService and ConnectionRegistry:
One remaining unresolved issue is how to tell the RemotingService/ConnectionRegistry which transports it supports (i.e. who calls register?)- currently this is hardcoded,