Save This Page
Home » spring-framework-2.5.5-with-dependencies » org.springframework » web » portlet » handler » [javadoc | source]
org.springframework.web.portlet.handler
abstract public class: AbstractMapBasedHandlerMapping [javadoc | source]
java.lang.Object
   org.springframework.context.support.ApplicationObjectSupport
      org.springframework.web.portlet.handler.AbstractHandlerMapping
         org.springframework.web.portlet.handler.AbstractMapBasedHandlerMapping

All Implemented Interfaces:
    HandlerMapping, Ordered, ApplicationContextAware

Direct Known Subclasses:
    PortletModeParameterHandlerMapping, PortletModeHandlerMapping, DefaultAnnotationHandlerMapping, ParameterHandlerMapping

Abstract base class for org.springframework.web.portlet.HandlerMapping implementations that rely on a map which caches handler objects per lookup key. Supports arbitrary lookup keys, and automatically resolves handler bean names into handler bean instances.
Nested Class Summary:
protected interface  AbstractMapBasedHandlerMapping.PortletRequestMappingPredicate  Predicate interface for determining a match with a given request. 
Fields inherited from org.springframework.context.support.ApplicationObjectSupport:
logger
Method from org.springframework.web.portlet.handler.AbstractMapBasedHandlerMapping Summary:
getHandlerInternal,   getLookupKey,   registerHandler,   registerHandler,   registerHandlers,   setLazyInitHandlers
Methods from org.springframework.web.portlet.handler.AbstractHandlerMapping:
adaptInterceptor,   extendInterceptors,   getAdaptedInterceptors,   getDefaultHandler,   getHandler,   getHandlerExecutionChain,   getHandlerInternal,   getOrder,   initApplicationContext,   initInterceptors,   setApplyWebRequestInterceptorsToRenderPhaseOnly,   setDefaultHandler,   setInterceptors,   setOrder
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.handler.AbstractMapBasedHandlerMapping Detail:
 protected Object getHandlerInternal(PortletRequest request) throws Exception 
    Determines a handler for the computed lookup key for the given request.
 abstract protected Object getLookupKey(PortletRequest request) throws Exception
    Build a lookup key for the given request.
 protected  void registerHandler(Object lookupKey,
    Object handler) throws IllegalStateException, BeansException 
    Register the given handler instance for the given parameter value.
 protected  void registerHandler(Object lookupKey,
    Object handler,
    AbstractMapBasedHandlerMapping.PortletRequestMappingPredicate predicate) throws IllegalStateException, BeansException 
    Register the given handler instance for the given parameter value.
 protected  void registerHandlers(Map handlerMap) throws BeansException 
    Register all handlers specified in the Portlet mode map for the corresponding modes.
 public  void setLazyInitHandlers(boolean lazyInitHandlers) 
    Set whether to lazily initialize handlers. Only applicable to singleton handlers, as prototypes are always lazily initialized. Default is false, as eager initialization allows for more efficiency through referencing the handler objects directly.

    If you want to allow your handlers to be lazily initialized, make them "lazy-init" and set this flag to true. Just making them "lazy-init" will not work, as they are initialized through the references from the handler mapping in this case.