Package org.restlet.engine.resource
Class ClientInvocationHandler<T>
java.lang.Object
org.restlet.engine.resource.ClientInvocationHandler<T>
- Type Parameters:
T- The annotated resource interface.
- All Implemented Interfaces:
InvocationHandler
Reflection proxy invocation handler created for the
ClientResource.wrap(Class) and related methods.- Author:
- Jerome Louvel
-
Constructor Summary
ConstructorsConstructorDescriptionClientInvocationHandler(ClientResource clientResource, Class<? extends T> resourceInterface) Constructor.ClientInvocationHandler(ClientResource clientResource, Class<? extends T> resourceInterface, AnnotationUtils annotationUtils) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the annotations of the resource interface.Returns the associated annotation utils.Returns the associated client resource.protected RequestgetRequest(Method javaMethod, Object[] args) Allows for child classes to modify the request.Effectively invokes a Java method on the given proxy object.
-
Constructor Details
-
ClientInvocationHandler
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
Returns the annotations of the resource interface.- Returns:
- The annotations of the resource interface.
-
getAnnotationUtils
Returns the associated annotation utils.- Returns:
- The associated annotation utils.
-
getClientResource
Returns the associated client resource.- Returns:
- The associated client resource.
-
getRequest
Allows for child classes to modify the request.- Throws:
Throwable
-
invoke
Effectively invokes a Java method on the given proxy object.- Specified by:
invokein interfaceInvocationHandler- Throws:
Throwable
-