org.springframework.web.servlet.mvc.annotation
Class AnnotationMethodHandlerAdapter.ServletHandlerMethodInvoker

java.lang.Object
  extended by org.springframework.web.bind.annotation.support.HandlerMethodInvoker
      extended by org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.ServletHandlerMethodInvoker
Enclosing class:
AnnotationMethodHandlerAdapter

private class AnnotationMethodHandlerAdapter.ServletHandlerMethodInvoker
extends HandlerMethodInvoker

Servlet-specific subclass of HandlerMethodInvoker.


Field Summary
private  boolean responseArgumentUsed
           
 
Constructor Summary
private AnnotationMethodHandlerAdapter.ServletHandlerMethodInvoker(HandlerMethodResolver resolver)
           
 
Method Summary
protected  WebDataBinder createBinder(NativeWebRequest webRequest, java.lang.Object target, java.lang.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)
           
 ModelAndView getModelAndView(java.lang.reflect.Method handlerMethod, java.lang.Class handlerType, java.lang.Object returnValue, ExtendedModelMap implicitModel, ServletWebRequest webRequest)
           
private  void handleHttpEntityResponse(HttpEntity<?> responseEntity, ServletWebRequest webRequest)
           
private  void handleResponseBody(java.lang.Object returnValue, ServletWebRequest webRequest)
           
protected  void raiseMissingParameterException(java.lang.String paramName, java.lang.Class paramType)
           
protected  void raiseSessionRequiredException(java.lang.String message)
           
protected  java.lang.Object resolveCookieValue(java.lang.String cookieName, java.lang.Class paramType, NativeWebRequest webRequest)
          Resolves the given @CookieValue annotation.
protected  java.lang.Object resolveDefaultValue(java.lang.String value)
           
protected  java.lang.String resolvePathVariable(java.lang.String pathVarName, java.lang.Class paramType, NativeWebRequest webRequest)
          Resolves the given @PathVariable annotation.
protected  java.lang.Object resolveStandardArgument(java.lang.Class<?> parameterType, NativeWebRequest webRequest)
           
private  void writeWithMessageConverters(java.lang.Object returnValue, HttpInputMessage inputMessage, HttpOutputMessage outputMessage)
           
 
Methods inherited from class org.springframework.web.bind.annotation.support.HandlerMethodInvoker
addReturnValueAsModelAttribute, initBinder, invokeHandlerMethod, isBindingCandidate, parseDefaultValueAttribute, raiseMissingCookieException, raiseMissingHeaderException, resolveCommonArgument, resolveRequestBody, updateModelAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

responseArgumentUsed

private boolean responseArgumentUsed
Constructor Detail

AnnotationMethodHandlerAdapter.ServletHandlerMethodInvoker

private AnnotationMethodHandlerAdapter.ServletHandlerMethodInvoker(HandlerMethodResolver resolver)
Method Detail

raiseMissingParameterException

protected void raiseMissingParameterException(java.lang.String paramName,
                                              java.lang.Class paramType)
                                       throws java.lang.Exception
Overrides:
raiseMissingParameterException in class HandlerMethodInvoker
Throws:
java.lang.Exception

raiseSessionRequiredException

protected void raiseSessionRequiredException(java.lang.String message)
                                      throws java.lang.Exception
Overrides:
raiseSessionRequiredException in class HandlerMethodInvoker
Throws:
java.lang.Exception

createBinder

protected WebDataBinder createBinder(NativeWebRequest webRequest,
                                     java.lang.Object target,
                                     java.lang.String objectName)
                              throws java.lang.Exception
Overrides:
createBinder in class HandlerMethodInvoker
Throws:
java.lang.Exception

doBind

protected void doBind(WebDataBinder binder,
                      NativeWebRequest webRequest)
               throws java.lang.Exception
Overrides:
doBind in class HandlerMethodInvoker
Throws:
java.lang.Exception

createHttpInputMessage

protected HttpInputMessage createHttpInputMessage(NativeWebRequest webRequest)
                                           throws java.lang.Exception
Description copied from class: HandlerMethodInvoker
Return a HttpInputMessage for the given NativeWebRequest.

Throws an UnsupportedOperation1Exception by default.

Overrides:
createHttpInputMessage in class HandlerMethodInvoker
Throws:
java.lang.Exception

createHttpOutputMessage

protected HttpOutputMessage createHttpOutputMessage(NativeWebRequest webRequest)
                                             throws java.lang.Exception
Description copied from class: HandlerMethodInvoker
Return a HttpOutputMessage for the given NativeWebRequest.

Throws an UnsupportedOperationException by default.

Overrides:
createHttpOutputMessage in class HandlerMethodInvoker
Throws:
java.lang.Exception

resolveDefaultValue

protected java.lang.Object resolveDefaultValue(java.lang.String value)
Overrides:
resolveDefaultValue in class HandlerMethodInvoker

resolveCookieValue

protected java.lang.Object resolveCookieValue(java.lang.String cookieName,
                                              java.lang.Class paramType,
                                              NativeWebRequest webRequest)
                                       throws java.lang.Exception
Description copied from class: HandlerMethodInvoker
Resolves the given @CookieValue annotation.

Throws an UnsupportedOperationException by default.

Overrides:
resolveCookieValue in class HandlerMethodInvoker
Throws:
java.lang.Exception

resolvePathVariable

protected java.lang.String resolvePathVariable(java.lang.String pathVarName,
                                               java.lang.Class paramType,
                                               NativeWebRequest webRequest)
                                        throws java.lang.Exception
Description copied from class: HandlerMethodInvoker
Resolves the given @PathVariable annotation.

Throws an UnsupportedOperationException by default.

Overrides:
resolvePathVariable in class HandlerMethodInvoker
Throws:
java.lang.Exception

resolveStandardArgument

protected java.lang.Object resolveStandardArgument(java.lang.Class<?> parameterType,
                                                   NativeWebRequest webRequest)
                                            throws java.lang.Exception
Overrides:
resolveStandardArgument in class HandlerMethodInvoker
Throws:
java.lang.Exception

getModelAndView

public ModelAndView getModelAndView(java.lang.reflect.Method handlerMethod,
                                    java.lang.Class handlerType,
                                    java.lang.Object returnValue,
                                    ExtendedModelMap implicitModel,
                                    ServletWebRequest webRequest)
                             throws java.lang.Exception
Throws:
java.lang.Exception

handleResponseBody

private void handleResponseBody(java.lang.Object returnValue,
                                ServletWebRequest webRequest)
                         throws java.lang.Exception
Throws:
java.lang.Exception

handleHttpEntityResponse

private void handleHttpEntityResponse(HttpEntity<?> responseEntity,
                                      ServletWebRequest webRequest)
                               throws java.lang.Exception
Throws:
java.lang.Exception

writeWithMessageConverters

private void writeWithMessageConverters(java.lang.Object returnValue,
                                        HttpInputMessage inputMessage,
                                        HttpOutputMessage outputMessage)
                                 throws java.io.IOException,
                                        HttpMediaTypeNotAcceptableException
Throws:
java.io.IOException
HttpMediaTypeNotAcceptableException