Package org.jboss.resteasy.core
Class MethodInjectorImpl
- java.lang.Object
-
- org.jboss.resteasy.core.MethodInjectorImpl
-
- All Implemented Interfaces:
MethodInjector
public class MethodInjectorImpl extends Object implements MethodInjector
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanexpectsBodyprotected ResteasyProviderFactoryfactoryprotected MethodinterfaceBasedMethodprotected ResourceLocatormethodprotected ValueInjector[]params
-
Constructor Summary
Constructors Constructor Description MethodInjectorImpl(ResourceLocator resourceMethod, ResteasyProviderFactory factory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanexpectsBody()static MethodfindInterfaceBasedMethod(Class<?> root, Method method)ValueInjector[]getParams()ObjectinjectArguments(HttpRequest input, HttpResponse response)Create the arguments that would be used to invoke the method in the context of an HTTP request.Objectinvoke(HttpRequest request, HttpResponse httpResponse, Object resource)Invoke on a method in the context of an HTTP request.
-
-
-
Field Detail
-
params
protected ValueInjector[] params
-
factory
protected ResteasyProviderFactory factory
-
method
protected ResourceLocator method
-
interfaceBasedMethod
protected Method interfaceBasedMethod
-
expectsBody
protected boolean expectsBody
-
-
Constructor Detail
-
MethodInjectorImpl
public MethodInjectorImpl(ResourceLocator resourceMethod, ResteasyProviderFactory factory)
-
-
Method Detail
-
expectsBody
public boolean expectsBody()
- Specified by:
expectsBodyin interfaceMethodInjector
-
findInterfaceBasedMethod
public static Method findInterfaceBasedMethod(Class<?> root, Method method)
-
getParams
public ValueInjector[] getParams()
- Specified by:
getParamsin interfaceMethodInjector
-
injectArguments
public Object injectArguments(HttpRequest input, HttpResponse response)
Description copied from interface:MethodInjectorCreate the arguments that would be used to invoke the method in the context of an HTTP request.- Specified by:
injectArgumentsin interfaceMethodInjector- Parameters:
input- http requestresponse- http response- Returns:
- array of arguments or CompletionStage
-
invoke
public Object invoke(HttpRequest request, HttpResponse httpResponse, Object resource) throws Failure, ApplicationException
Description copied from interface:MethodInjectorInvoke on a method in the context of an HTTP request. Does all JAX-RS parameter injection.- Specified by:
invokein interfaceMethodInjector- Parameters:
request- http requesthttpResponse- http responseresource- target object- Returns:
- returned object or CompletionStage
- Throws:
Failure- if application failure occurredApplicationException
-
-