Overview of design:
This covers the steps involved in making a remote invocation using prototype of unified invoker using the remoting layer. This is how is currently in prototype and is only here to demonstrate how things are working now to help highlight where design needs to be refactored.
Call invoke() on Client, which is entry point to remoting. Also provides API for oneway class and adding callback handlers via Client interface.
Call on the InvokerRegistry to get the ClientInvoker implementation, who will make the actual invocation across the wire. If the InvokerRegistry recognizes that the locator specified in getting the ClientInvoker is local, will return the LocalClientInvoker, which makes by reference calls vs remote.
Client then calls on its given ClientInvoker to make the invocation.
ClientInvoker then calls the MarshalFactory to get the appropriate Marshaller based on its data type (i.e. serialization).
ClientInvoker then calls on its abstract method transport(), which will call into the transport enabled implementation of ClientInvoker (i.e. SocketClientInvoker). This method takes the Marshaller as the parameter since the transport implementation may not have reference to the data output until it gets ready to send.
ClientInvoker then passes its data output for it�s transport to the Marshaller and tells it to write out the invocation object.
Marshaller will marshall the invocation object directly to the data output (which could be streamed)
The bytes are written over the network.
The ServerInvoker will have have called on the MarshalFactory to get the appropriate UnMarshaller based on data type.
The ServerInvoker will be listening for data on the wire and have already asked the UnMarshaller to read from the data input that it has supplied the UnMarshaller.
Once the invocation has been unmarshalled, the ServerInvoker will call invoke() on itself. This allows for any common remoting processing that may be required, such as registering a callback handler.
ServerInvoker finds the intended target handler and passes the payload onto it. In this case, the UnifiedInvoker, which will then make the jmx invocation on down the interceptor chain.