org.springframework.web.servlet.mvc.multiaction
Interface MethodNameResolver

All Known Implementing Classes:
AbstractUrlMethodNameResolver, ParameterMethodNameResolver

public interface MethodNameResolver

Interface that parameterizes the MultiActionController class using the Strategy GoF Design pattern, allowing the mapping from incoming request to handler method name to be varied without affecting other application code.

Illustrates how delegation can be more flexible than subclassing.

Author:
Rod Johnson
See Also:
MultiActionController.setMethodNameResolver(org.springframework.web.servlet.mvc.multiaction.MethodNameResolver)

Method Summary
 String getHandlerMethodName(HttpServletRequest request)
          Return a method name that can handle this request.
 

Method Detail

getHandlerMethodName

public String getHandlerMethodName(HttpServletRequest request)
                            throws NoSuchRequestHandlingMethodException
Return a method name that can handle this request. Such mappings are typically, but not necessarily, based on URL.

Parameters:
request - current HTTP request
Returns:
a method name that can handle this request. Never returns null; throws exception if not resolvable.
Throws:
NoSuchRequestHandlingMethodException - if no method can be found for this URL


Copyright (C) 2003-2004 The Spring Framework Project.