org.springframework.web.servlet.handler
Class AbstractHandlerMapping

org.springframework.context.support.ApplicationObjectSupport
  |
  +--org.springframework.web.context.support.WebApplicationObjectSupport
        |
        +--org.springframework.web.servlet.handler.AbstractHandlerMapping
Direct Known Subclasses:
AbstractUrlHandlerMapping

public abstract class AbstractHandlerMapping
extends WebApplicationObjectSupport
implements HandlerMapping, Ordered

Abstract base class for HandlerMapping implementations. Supports ordering, a default handler, and handler interceptors.

Author:
Juergen Hoeller
Since: 07.04.2003
See Also: getHandlerInternal(HttpServletRequest), HandlerInterceptor

Method Summary
 final HandlerExecutionChaingetHandler(HttpServletRequest request)
          Look up a handler for the given request, falling back to the default handler if no specific one is found.
 final intgetOrder()
           
 final voidsetDefaultHandler(Object defaultHandler)
          Set the default handler for this handler mapping.
 final voidsetInterceptors(HandlerInterceptor[] interceptors)
          Set the handler interceptors to apply for all handlers mapped by this handler mapping.
 final voidsetOrder(int order)
           

Methods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, setApplicationContext

Method Detail

getHandler

public final HandlerExecutionChain getHandler(HttpServletRequest request)
throws java.lang.Exception
Look up a handler for the given request, falling back to the default handler if no specific one is found.
Parameters:
request - current HTTP request
Returns: the looked up handler instance, or the default handler
See Also:
getHandlerInternal(HttpServletRequest)

getOrder

public final int getOrder()

setDefaultHandler

public final void setDefaultHandler(Object defaultHandler)
Set the default handler for this handler mapping. This handler will be returned if no specific mapping was found. Default is null.
Parameters:
defaultHandler - default handler instance, or null if none

setInterceptors

public final void setInterceptors(HandlerInterceptor[] interceptors)
Set the handler interceptors to apply for all handlers mapped by this handler mapping.
Parameters:
interceptors - array of handler interceptors, or null if none

setOrder

public final void setOrder(int order)

Association Links

to Class org.springframework.web.servlet.HandlerInterceptor