Save This Page
Home » spring-framework-2.5.5-with-dependencies » org.springframework » web » portlet » mvc » annotation » [javadoc | source]
org.springframework.web.portlet.mvc.annotation
public class: AnnotationMethodHandlerAdapter [javadoc | source]
java.lang.Object
   org.springframework.context.support.ApplicationObjectSupport
      org.springframework.web.portlet.context.PortletApplicationObjectSupport
         org.springframework.web.portlet.handler.PortletContentGenerator
            org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter

All Implemented Interfaces:
    HandlerAdapter, PortletContextAware, ApplicationContextAware

Implementation of the org.springframework.web.portlet.HandlerAdapter interface that maps handler methods based on portlet modes, action/render phases and request parameters expressed through the RequestMapping annotation.

Supports request parameter binding through the RequestParam annotation. Also supports the ModelAttribute annotation for exposing model attribute values to the view, as well as InitBinder for binder initialization methods and SessionAttributes for automatic session management of specific attributes.

This adapter can be customized through various bean properties. A common use case is to apply shared binder initialization logic through a custom WebBindingInitializer .

Fields inherited from org.springframework.context.support.ApplicationObjectSupport:
logger
Method from org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter Summary:
createBinder,   doHandle,   handleAction,   handleRender,   setCustomArgumentResolver,   setCustomArgumentResolvers,   setParameterNameDiscoverer,   setSessionAttributeStore,   setSynchronizeOnSession,   setWebBindingInitializer,   supports
Methods from org.springframework.web.portlet.handler.PortletContentGenerator:
applyCacheSeconds,   cacheForSeconds,   check,   checkAndPrepare,   checkAndPrepare,   getCacheSeconds,   isRequireSession,   preventCaching,   setCacheSeconds,   setRequireSession
Methods from org.springframework.web.portlet.context.PortletApplicationObjectSupport:
getPortletContext,   getTempDir,   isContextRequired,   setPortletContext
Methods from org.springframework.context.support.ApplicationObjectSupport:
getApplicationContext,   getMessageSourceAccessor,   initApplicationContext,   initApplicationContext,   isContextRequired,   requiredContextClass,   setApplicationContext
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter Detail:
 protected PortletRequestDataBinder createBinder(PortletRequest request,
    Object target,
    String objectName) throws Exception 
    Template method for creating a new PortletRequestDataBinder instance.

    The default implementation creates a standard PortletRequestDataBinder. This can be overridden for custom PortletRequestDataBinder subclasses.

 protected ModelAndView doHandle(PortletRequest request,
    PortletResponse response,
    Object handler) throws Exception 
 public  void handleAction(ActionRequest request,
    ActionResponse response,
    Object handler) throws Exception 
 public ModelAndView handleRender(RenderRequest request,
    RenderResponse response,
    Object handler) throws Exception 
 public  void setCustomArgumentResolver(WebArgumentResolver argumentResolver) 
    Set a custom ArgumentResolvers to use for special method parameter types. Such a custom ArgumentResolver will kick in first, having a chance to resolve an argument value before the standard argument handling kicks in.
 public  void setCustomArgumentResolvers(WebArgumentResolver[] argumentResolvers) 
    Set one or more custom ArgumentResolvers to use for special method parameter types. Any such custom ArgumentResolver will kick in first, having a chance to resolve an argument value before the standard argument handling kicks in.
 public  void setParameterNameDiscoverer(ParameterNameDiscoverer parameterNameDiscoverer) 
 public  void setSessionAttributeStore(SessionAttributeStore sessionAttributeStore) 
 public  void setSynchronizeOnSession(boolean synchronizeOnSession) 
    Set if controller execution should be synchronized on the session, to serialize parallel invocations from the same client.

    More specifically, the execution of each handler method will get synchronized if this flag is "true". The best available session mutex will be used for the synchronization; ideally, this will be a mutex exposed by HttpSessionMutexListener.

    The session mutex is guaranteed to be the same object during the entire lifetime of the session, available under the key defined by the SESSION_MUTEX_ATTRIBUTE constant. It serves as a safe reference to synchronize on for locking on the current session.

    In many cases, the PortletSession reference itself is a safe mutex as well, since it will always be the same object reference for the same active logical session. However, this is not guaranteed across different servlet containers; the only 100% safe way is a session mutex.

 public  void setWebBindingInitializer(WebBindingInitializer webBindingInitializer) 
    Specify a WebBindingInitializer which will apply pre-configured configuration to every DataBinder that this controller uses.
 public boolean supports(Object handler)