All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.openyelp.client.RectClient Maven / Gradle / Ivy

There is a newer version: 1.04
Show newest version
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