*/
private static void run() {
// 1)
// creates a new remote proxy for the TestImpl1 class which maps to an instance of this
// class on the server
RemoteProxy proxy1 = RemoteProxy.createClientProxy(new String[] {
"examples.connectivity.Test1"
}, "examples.connectivity.Test1Impl", "localhost", 6663);
// retrieves the proxy the the TestImpl1 instance
Test1 mixin1 = (Test1) proxy1.getInstance();
// 2)
// retrieve the proxy to a specific instance created on the server
RemoteProxy proxy2 = mixin1.getTest1();
// retrieves the proxy the the TestImpl2 instance
Test2 mixin2 = (Test2) proxy2.getInstance();
// 3)
// invoke methods on the proxies (executed on the server)
System.out.println("Mixin1 says: " + mixin1.test1());
System.out.println("Mixin2 says: " + mixin2.test2());
// 4)
// close the proxies (close() must always be called)
proxy1.close();
proxy2.close();
}