org.restlet.engine.resource
Class ClientInvocationHandler<T>

java.lang.Object
  extended by 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 Summary
ClientInvocationHandler(ClientResource clientResource, Class<? extends T> resourceInterface)
          Constructor.
 
Method Summary
 List<AnnotationInfo> getAnnotations()
          Returns the annotations of the resource interface.
 ClientResource getClientResource()
          Returns the associated client resource.
 Object invoke(Object proxy, Method javaMethod, Object[] args)
          Effectively invokes a Java method on the given proxy object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientInvocationHandler

public ClientInvocationHandler(ClientResource clientResource,
                               Class<? extends T> resourceInterface)
Constructor.

Parameters:
clientResource - The associated client resource.
resourceInterface - The annotated resource interface.
Method Detail

getAnnotations

public List<AnnotationInfo> getAnnotations()
Returns the annotations of the resource interface.

Returns:
The annotations of the resource interface.

getClientResource

public ClientResource getClientResource()
Returns the associated client resource.

Returns:
The associated client resource.

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


Copyright © 2005-2013 Restlet.