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 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 for Path, GET, POST, QueryParam, FormParam, HeaderParam, PathParam., PATCH
      Type Parameters:
      I - The interface to implement
      Parameters:
      restInterface - The interface to implement
      baseUrl - The service base baseUrl
      config - Client configuration
      interceptors - The interceptors that will be able to intercept all proxy method calls
      Returns:
      a proxy implementation of restInterface
    • createProxy

      public static <I> I createProxy​(Class<I> restInterface, String baseUrl)