Developer's Guide
Example xmote HTTP Client Usage
Using the xmote HTTP Client interface is as simple as creating a
proxy with the XmoteHttpClient.newInstance(...)
factory
method. The factory utilizes the java.lang.reflect.Proxy
class to create dynamic proxy class to dispatch all method calls to the
xmote server.
String url = "http://localhost:8888/0/"; Class[] interfaces = new Class[] {Test.class}; Test test = (Test)XmoteHttpClient.newInstance(url, interfaces); int rv = test.sizeOf(url);
Example xmote HTTP Server Usage
Using the xmote HTTP Server interface is as simple as creating a
XmoteHttpServer
instance and then adding your service class
to that XmoteHttpServer
instance.
Test test = new TestImpl(); XmoteHttpServer server = new XmoteHttpServer("0.0.0.0", 8888); server.start(); String url = server.addService(test);