org.cruxframework.crux.core.server.rest.core.dispatch
Class MethodInvoker
java.lang.Object
org.cruxframework.crux.core.server.rest.core.dispatch.MethodInvoker
public class MethodInvoker
- extends Object
- Author:
- Thiago da Rosa de Bustamante
|
Method Summary |
protected static ValueInjector |
createParameterExtractor(Class<?> injectTargetClass,
Type type,
Annotation[] annotations)
|
protected static ValueInjector |
createParameterExtractorForComplexType(Class<?> injectTargetClass,
Type type,
Annotation[] annotations)
The user can define a value object to group parameters that are passed in the same way (query, form, path, cookie, header). |
protected static ValueInjector |
createParameterExtractorForSimpleType(Class<?> injectTargetClass,
Type type,
Annotation[] annotations)
|
protected static ValueInjector |
createParameterExtractorForSimpleType(MethodInvoker.RestParameterType restParameterType,
Class<?> injectTargetClass,
Type type,
String paramName,
String defaultValue)
|
ValueInjector[] |
getParams()
|
protected void |
initializePreprocessors()
|
Object[] |
injectArguments(HttpRequest input)
|
Object |
invoke(HttpRequest request,
Object resource)
|
protected void |
preprocess(HttpRequest request)
|
protected void |
validateParamExtractors(String httpMethod)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
method
protected Method method
rootClass
protected Class<?> rootClass
params
protected ValueInjector[] params
preprocessors
protected List<RequestPreprocessor> preprocessors
MethodInvoker
public MethodInvoker(Class<?> root,
Method method,
String httpMethod)
getParams
public ValueInjector[] getParams()
injectArguments
public Object[] injectArguments(HttpRequest input)
invoke
public Object invoke(HttpRequest request,
Object resource)
throws RestFailure
- Throws:
RestFailure
initializePreprocessors
protected void initializePreprocessors()
throws RequestProcessorException
- Throws:
RequestProcessorException
preprocess
protected void preprocess(HttpRequest request)
throws RestFailure
- Throws:
RestFailure
createParameterExtractor
protected static ValueInjector createParameterExtractor(Class<?> injectTargetClass,
Type type,
Annotation[] annotations)
createParameterExtractorForSimpleType
protected static ValueInjector createParameterExtractorForSimpleType(Class<?> injectTargetClass,
Type type,
Annotation[] annotations)
createParameterExtractorForSimpleType
protected static ValueInjector createParameterExtractorForSimpleType(MethodInvoker.RestParameterType restParameterType,
Class<?> injectTargetClass,
Type type,
String paramName,
String defaultValue)
createParameterExtractorForComplexType
protected static ValueInjector createParameterExtractorForComplexType(Class<?> injectTargetClass,
Type type,
Annotation[] annotations)
- The user can define a value object to group parameters that are passed in the same way (query, form, path, cookie, header).
- Parameters:
injectTargetClass - injectTarget - type - genericType - annotations -
- Returns:
validateParamExtractors
protected void validateParamExtractors(String httpMethod)
Copyright © 2015. All rights reserved.