public class MethodInvoker extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
MethodInvoker.RestParameterType |
| Modifier and Type | Field and Description |
|---|---|
protected Method |
method |
protected ValueInjector[] |
params |
protected List<RequestPostprocessor> |
postprocessors |
protected List<RequestPreprocessor> |
preprocessors |
protected Class<?> |
rootClass |
| Constructor and Description |
|---|
MethodInvoker(Class<?> root,
Method method,
String httpMethod) |
| Modifier and Type | Method and Description |
|---|---|
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 |
initializePostprocessors() |
protected void |
initializePreprocessors() |
Object[] |
injectArguments(HttpRequest input) |
Object |
invoke(HttpRequest request,
HttpResponse response,
Object resource) |
protected void |
postprocess(HttpRequest request,
HttpResponse response) |
protected void |
preprocess(HttpRequest request) |
protected void |
validateParamExtractors(String httpMethod) |
protected Method method
protected Class<?> rootClass
protected ValueInjector[] params
protected List<RequestPreprocessor> preprocessors
protected List<RequestPostprocessor> postprocessors
public ValueInjector[] getParams()
public Object[] injectArguments(HttpRequest input)
public Object invoke(HttpRequest request, HttpResponse response, Object resource) throws RestFailure
RestFailureprotected void initializePostprocessors()
throws RequestProcessorException
RequestProcessorExceptionprotected void initializePreprocessors()
throws RequestProcessorException
RequestProcessorExceptionprotected void postprocess(HttpRequest request, HttpResponse response) throws RestFailure
RestFailureprotected void preprocess(HttpRequest request) throws RestFailure
RestFailureprotected static ValueInjector createParameterExtractor(Class<?> injectTargetClass, Type type, Annotation[] annotations)
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)
protected static ValueInjector createParameterExtractorForComplexType(Class<?> injectTargetClass, Type type, Annotation[] annotations)
injectTargetClass - injectTarget - type - genericType - annotations - protected void validateParamExtractors(String httpMethod)
Copyright © 2016. All rights reserved.