Interface ViewResolver

All Known Implementing Classes:

public interface ViewResolver

This interface is used to abstract the algorithm used to:

  1. map a HTTP request to a view and
  2. map a an unhandled exception to a an error handler view

A class implementing this interface is expected to have a single public contructor adhering to the following convention:

  1. the single constructor should accepts no arguments or
  2. the single constructor should declare formal parameters using only the following types documented at the URL below:

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 a method at runtime for implementations of this interface, the details of the methods is given below:

Resolution resolveRequest( ... )

This method will be called by Induction when it needs to resolve an incoming HTTP request to a view. The method is expected to return a Resolution object describing the view to be invoked, or null if the request did not resolve to a view. This method may request the injection of any value available to a view (including of course an instance of javax.servlet.http.HttpServletRequest), the full list of values available for injection are detailed at the URL below:

Adinath Raveendra Raj

Nested Class Summary
static class ViewResolver.Resolution
          A container object containing the resolution information.

Copyright © 2008-2013 Acciente, LLC. All Rights Reserved.