public class ApiClientInvocationHandler
extends java.lang.Object
implements java.lang.reflect.InvocationHandler
Modifier and Type | Method and Description |
---|---|
static <T> T |
createProxy(java.lang.Class<T> apiInterface,
T jerseyClientProxy)
Creates a proxy around the given
jerseyClientProxy that wraps all WebApplicationException s in ClientRequestException s. |
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args) |
public static <T> T createProxy(java.lang.Class<T> apiInterface, T jerseyClientProxy)
jerseyClientProxy
that wraps all WebApplicationException
s in ClientRequestException
s.T
- the client interfaceapiInterface
- the client interfacejerseyClientProxy
- the proxy instance build by WebResourceFactory.newResource(Class<C> resourceInterface, ...)
jerseyClientProxy
public java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args) throws java.lang.Throwable
invoke
in interface java.lang.reflect.InvocationHandler
java.lang.Throwable