com.openyelp.client.RectClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jsonrpc Show documentation
Show all versions of jsonrpc Show documentation
jsonrpc is a lightweight Rpc Framework
package com.openyelp.client;
import java.net.URL;
import com.openyelp.annotation.RestFul;
public class RectClient {
public static T getService(String url ,Class classc) {
T result = null;
HttpJsonRpcClientTransport transport;
try {
RestFul ful = classc.getAnnotation(RestFul.class);
transport = new HttpJsonRpcClientTransport(new URL(url));
JsonRpcInvoker invoker = new JsonRpcInvoker();
result = (T) invoker.get(transport, ful.value(),ful.api());
} catch (Exception e) {
e.printStackTrace();
}
return result;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy