String host="localhost"; int port=8889; CoolRMIServer server=new CoolRMIServer(getClass().getClassLoader(), host, port); server.addService(TestServiceInterface.class.getName(), new TestServiceImpl()); server.start();
String reply=((TestServiceInterface)new CoolRMIClient(host, port).getSingleUseService(TestServiceInterface.class.getClassLoader(), TestServiceInterface.class)).addPreAndPostfix("Cool RMI");