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:
java.lang.reflect.InvocationHandler

public class ClientInvocationHandler<T>
extends java.lang.Object
implements java.lang.reflect.InvocationHandler

Reflection proxy invocation handler created for the ClientResource.wrap(Class) and related methods.

Author:
Jerome Louvel

Constructor Summary
ClientInvocationHandler(ClientResource clientResource, java.lang.Class<? extends T> resourceInterface)
          Constructor.
 
Method Summary
 java.util.List<AnnotationInfo> getAnnotations()
          Returns the annotations of the resource interface.
 ClientResource getClientResource()
          Returns the associated client resource.
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method javaMethod, java.lang.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,
                               java.lang.Class<? extends T> resourceInterface)
Constructor.

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

getAnnotations

public java.util.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 java.lang.Object invoke(java.lang.Object proxy,
                               java.lang.reflect.Method javaMethod,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
Effectively invokes a Java method on the given proxy object.

Specified by:
invoke in interface java.lang.reflect.InvocationHandler
Throws:
java.lang.Throwable


Copyright © 2005-2013 Restlet.