|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ControllerResolver
This interface is used to abstract the algorithm used to:
A class implementing this interface is expected to have a single public contructor adhering to the following convention:
This interface no longer enforces any methods at compile time (Induction 1.4.0b was the last version to enforce compile time resolve() methods), instead this interface now simply serves as a marker now.
Induction looks for two methods at runtime for implementations of this interface, the details of the two methods are given below:
Resolution resolveRequest(...)
This method will be called by Induction when it needs to resolve an incoming HTTP request to a controller. The method is expected to return a Resolution object describing the controller to be invoked, or null if the request did not resolve to a controller. This method may request the injection of any value available to a controller (including of course an instance of javax.servlet.http.HttpServletRequest), the full list of values available for injection are detailed at the URL below:
http://www.inductionframework.org/param-injection-2-reference.html#ControllerresolverMETHODScommonlyusedparametertypes
Resolution resolveThrowable(...)
This method will be called by Induction when it needs to resolve an unhandled error or exceptions that is thrown during controller or view execution. The method is expected to return a Resolution object describing the controller to be invoked, or null if the exception/error did not resolve to a controller. This method may request the injection of a java.lang.Throwable and additionally any value available to a controller, the full list of additional values available for injection are detailed at the URL below:
http://www.inductionframework.org/param-injection-2-reference.html#ControllerresolverMETHODScommonlyusedparametertypes
Nested Class Summary | |
---|---|
static class |
ControllerResolver.Resolution
A container object for the resolution information. |
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |