The Spring Framework

## org.springframework.web.bind.annotation.support
Class HandlerMethodInvoker

    java.lang.Object
      org.springframework.web.bind.annotation.support.HandlerMethodInvoker

    public class HandlerMethodInvoker

extends Object

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`.

Since:
  2.5.2
Author:
  Juergen Hoeller
See Also:
  `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)`

Method Summary
`protected WebDataBinder` `createBinder(NativeWebRequest webRequest, Object target, String objectName)`
`protected void` `doBind(NativeWebRequest webRequest, WebDataBinder binder, boolean failOnErrors)`
`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. might potentially be subject to bean-style data binding later on.
`protected void` `raiseMissingParameterException(String paramName, Class paramType)`
`protected void` `raiseSessionRequiredException(String message)`
`protected Object` `resolveCommonArgument(MethodParameter methodParameter, NativeWebRequest webRequest)`
`protected Object` `resolveStandardArgument(Class parameterType, NativeWebRequest webRequest)`
`void` `updateModelAttributes(Object handler, Map 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

### HandlerMethodInvoker

    public HandlerMethodInvoker(HandlerMethodResolver methodResolver)

### HandlerMethodInvoker

    public HandlerMethodInvoker(HandlerMethodResolver methodResolver,
                                WebBindingInitializer bindingInitializer)

### HandlerMethodInvoker

    public HandlerMethodInvoker(HandlerMethodResolver methodResolver,
                                WebBindingInitializer bindingInitializer,
                                SessionAttributeStore sessionAttributeStore,
                                ParameterNameDiscoverer parameterNameDiscoverer,
                                WebArgumentResolver... customArgumentResolvers)

Method Detail

### invokeHandlerMethod

    public final Object invokeHandlerMethod(Method handlerMethod,
                                            Object handler,
                                            NativeWebRequest webRequest,
                                            ExtendedModelMap implicitModel)
                                     throws Exception

  Throws:
    `Exception`

### updateModelAttributes

    public final void updateModelAttributes(Object handler,
                                            Map mavModel,
                                            ExtendedModelMap implicitModel,
                                            NativeWebRequest webRequest)
                                     throws Exception

  Throws:
    `Exception`

### isBindingCandidate

    protected boolean isBindingCandidate(Object value)

  Determine whether the given value qualifies as a "binding candidate", i.e. might potentially be subject to bean-style data binding later on.

### raiseMissingParameterException

    protected void raiseMissingParameterException(String paramName,
                                                  Class paramType)
                                           throws Exception

  Throws:
    `Exception`

### raiseSessionRequiredException

    protected void raiseSessionRequiredException(String message)
                                          throws Exception

  Throws:
    `Exception`

### createBinder

    protected WebDataBinder createBinder(NativeWebRequest webRequest,
                                         Object target,
                                         String objectName)
                                  throws Exception

  Throws:
    `Exception`

### doBind

    protected void doBind(NativeWebRequest webRequest,
                          WebDataBinder binder,
                          boolean failOnErrors)
                   throws Exception

  Throws:
    `Exception`

### resolveCommonArgument

    protected Object resolveCommonArgument(MethodParameter methodParameter,
                                           NativeWebRequest webRequest)
                                    throws Exception

  Throws:
    `Exception`

### resolveStandardArgument

    protected Object resolveStandardArgument(Class parameterType,
                                             NativeWebRequest webRequest)
                                      throws Exception

  Throws:
    `Exception`

The Spring Framework

Copyright © 2002-2008 The Spring Framework.