Class ClientInvocationHandler<T>

java.lang.Object
org.restlet.engine.resource.ClientInvocationHandler<T>
Type Parameters:
T - The annotated resource interface.
All Implemented Interfaces:
InvocationHandler

public class ClientInvocationHandler<T> extends Object implements InvocationHandler
Reflection proxy invocation handler created for the ClientResource.wrap(Class) and related methods.
Author:
Jerome Louvel
  • Constructor Details

    • ClientInvocationHandler

      public ClientInvocationHandler(ClientResource clientResource, Class<? extends T> resourceInterface)
      Constructor.
      Parameters:
      clientResource - The associated client resource.
      resourceInterface - The annotated resource interface.
    • ClientInvocationHandler

      public ClientInvocationHandler(ClientResource clientResource, Class<? extends T> resourceInterface, AnnotationUtils annotationUtils)
      Constructor.
      Parameters:
      clientResource - The associated client resource.
      resourceInterface - The annotated resource interface.
      annotationUtils - The annotationUtils class.
  • Method Details

    • getAnnotations

      public List<AnnotationInfo> getAnnotations()
      Returns the annotations of the resource interface.
      Returns:
      The annotations of the resource interface.
    • getAnnotationUtils

      public AnnotationUtils getAnnotationUtils()
      Returns the associated annotation utils.
      Returns:
      The associated annotation utils.
    • getClientResource

      public ClientResource getClientResource()
      Returns the associated client resource.
      Returns:
      The associated client resource.
    • getRequest

      protected Request getRequest(Method javaMethod, Object[] args) throws Throwable
      Allows for child classes to modify the request.
      Throws:
      Throwable
    • invoke

      public Object invoke(Object proxy, Method javaMethod, Object[] args) throws Throwable
      Effectively invokes a Java method on the given proxy object.
      Specified by:
      invoke in interface InvocationHandler
      Throws:
      Throwable