Package si.mazi.rescu
Class RestProxyFactory
java.lang.Object
si.mazi.rescu.RestProxyFactory
public final class RestProxyFactory extends Object
- Author:
- Matija Mazi
- See Also:
createProxy(Class, InvocationHandler, Interceptor...)
-
Method Summary
Modifier and Type Method Description static <I> IcreateProxy(Class<I> restInterface, String baseUrl)static <I> IcreateProxy(Class<I> restInterface, String baseUrl, ClientConfig config, Interceptor... interceptors)Create a proxy implementation of restInterface.
-
Method Details
-
createProxy
public static <I> I createProxy(Class<I> restInterface, String baseUrl, ClientConfig config, Interceptor... interceptors)Create a proxy implementation of restInterface. The interface must be annotated with jax-rs annotations. Basic support exists forPath,GET,POST,QueryParam,FormParam,HeaderParam,PathParam.,PATCH- Type Parameters:
I- The interface to implement- Parameters:
restInterface- The interface to implementbaseUrl- The service base baseUrlconfig- Client configurationinterceptors- The interceptors that will be able to intercept all proxy method calls- Returns:
- a proxy implementation of restInterface
-
createProxy
-