|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.web.bind.annotation.support.HandlerMethodInvoker
public class HandlerMethodInvoker
Support class for invoking an annotated handler method. Operates on the introspection results of a HandlerMethodResolver
for a specific handler type.
Used by AnnotationMethodHandlerAdapter
and AnnotationMethodHandlerAdapter
.
invokeHandlerMethod(java.lang.reflect.Method, java.lang.Object, org.springframework.web.context.request.NativeWebRequest, org.springframework.ui.ExtendedModelMap)
Constructor Summary | |
---|---|
HandlerMethodInvoker(HandlerMethodResolver methodResolver)
|
|
HandlerMethodInvoker(HandlerMethodResolver methodResolver,
WebBindingInitializer bindingInitializer)
|
|
HandlerMethodInvoker(HandlerMethodResolver methodResolver,
WebBindingInitializer bindingInitializer,
SessionAttributeStore sessionAttributeStore,
ParameterNameDiscoverer parameterNameDiscoverer,
WebArgumentResolver[] customArgumentResolvers,
HttpMessageConverter[] messageConverters)
|
Method Summary | |
---|---|
protected void |
addReturnValueAsModelAttribute(Method handlerMethod,
Class handlerType,
Object returnValue,
ExtendedModelMap implicitModel)
|
protected WebDataBinder |
createBinder(NativeWebRequest webRequest,
Object target,
String objectName)
|
protected HttpInputMessage |
createHttpInputMessage(NativeWebRequest webRequest)
Return a HttpInputMessage for the given NativeWebRequest . |
protected HttpOutputMessage |
createHttpOutputMessage(NativeWebRequest webRequest)
Return a HttpOutputMessage for the given NativeWebRequest . |
protected void |
doBind(WebDataBinder binder,
NativeWebRequest webRequest)
|
protected void |
initBinder(Object handler,
String attrName,
WebDataBinder binder,
NativeWebRequest webRequest)
|
Object |
invokeHandlerMethod(Method handlerMethod,
Object handler,
NativeWebRequest webRequest,
ExtendedModelMap implicitModel)
|
protected boolean |
isBindingCandidate(Object value)
Determine whether the given value qualifies as a "binding candidate", i.e. |
protected String |
parseDefaultValueAttribute(String value)
|
protected void |
raiseMissingCookieException(String cookieName,
Class paramType)
|
protected void |
raiseMissingHeaderException(String headerName,
Class paramType)
|
protected void |
raiseMissingParameterException(String paramName,
Class paramType)
|
protected void |
raiseSessionRequiredException(String message)
|
protected Object |
resolveCommonArgument(MethodParameter methodParameter,
NativeWebRequest webRequest)
|
protected Object |
resolveCookieValue(String cookieName,
Class paramType,
NativeWebRequest webRequest)
Resolves the given @CookieValue annotation. |
protected Object |
resolveDefaultValue(String value)
|
protected String |
resolvePathVariable(String pathVarName,
Class paramType,
NativeWebRequest webRequest)
Resolves the given @PathVariable annotation. |
protected Object |
resolveRequestBody(MethodParameter methodParam,
NativeWebRequest webRequest,
Object handler)
Resolves the given @RequestBody annotation. |
protected Object |
resolveStandardArgument(Class<?> parameterType,
NativeWebRequest webRequest)
|
void |
updateModelAttributes(Object handler,
Map<String,Object> mavModel,
ExtendedModelMap implicitModel,
NativeWebRequest webRequest)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HandlerMethodInvoker(HandlerMethodResolver methodResolver)
public HandlerMethodInvoker(HandlerMethodResolver methodResolver, WebBindingInitializer bindingInitializer)
public HandlerMethodInvoker(HandlerMethodResolver methodResolver, WebBindingInitializer bindingInitializer, SessionAttributeStore sessionAttributeStore, ParameterNameDiscoverer parameterNameDiscoverer, WebArgumentResolver[] customArgumentResolvers, HttpMessageConverter[] messageConverters)
Method Detail |
---|
public final Object invokeHandlerMethod(Method handlerMethod, Object handler, NativeWebRequest webRequest, ExtendedModelMap implicitModel) throws Exception
Exception
public final void updateModelAttributes(Object handler, Map<String,Object> mavModel, ExtendedModelMap implicitModel, NativeWebRequest webRequest) throws Exception
Exception
protected void initBinder(Object handler, String attrName, WebDataBinder binder, NativeWebRequest webRequest) throws Exception
Exception
protected Object resolveRequestBody(MethodParameter methodParam, NativeWebRequest webRequest, Object handler) throws Exception
@RequestBody
annotation.
Exception
protected Object resolveCookieValue(String cookieName, Class paramType, NativeWebRequest webRequest) throws Exception
@CookieValue
annotation.
Throws an UnsupportedOperationException by default.
Exception
protected String resolvePathVariable(String pathVarName, Class paramType, NativeWebRequest webRequest) throws Exception
@PathVariable
annotation.
Throws an UnsupportedOperationException by default.
Exception
protected boolean isBindingCandidate(Object value)
protected void raiseMissingParameterException(String paramName, Class paramType) throws Exception
Exception
protected void raiseMissingHeaderException(String headerName, Class paramType) throws Exception
Exception
protected void raiseMissingCookieException(String cookieName, Class paramType) throws Exception
Exception
protected void raiseSessionRequiredException(String message) throws Exception
Exception
protected WebDataBinder createBinder(NativeWebRequest webRequest, Object target, String objectName) throws Exception
Exception
protected void doBind(WebDataBinder binder, NativeWebRequest webRequest) throws Exception
Exception
protected HttpInputMessage createHttpInputMessage(NativeWebRequest webRequest) throws Exception
HttpInputMessage
for the given NativeWebRequest
.
Throws an UnsupportedOperation1Exception by default.
Exception
protected HttpOutputMessage createHttpOutputMessage(NativeWebRequest webRequest) throws Exception
HttpOutputMessage
for the given NativeWebRequest
.
Throws an UnsupportedOperationException by default.
Exception
protected String parseDefaultValueAttribute(String value)
protected Object resolveDefaultValue(String value)
protected Object resolveCommonArgument(MethodParameter methodParameter, NativeWebRequest webRequest) throws Exception
Exception
protected Object resolveStandardArgument(Class<?> parameterType, NativeWebRequest webRequest) throws Exception
Exception
protected final void addReturnValueAsModelAttribute(Method handlerMethod, Class handlerType, Object returnValue, ExtendedModelMap implicitModel)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |