net.sourceforge.stripes.integration.spring
Class SpringInterceptorSupport

java.lang.Object
  extended by net.sourceforge.stripes.integration.spring.SpringInterceptorSupport
All Implemented Interfaces:
ConfigurableComponent, Interceptor

public abstract class SpringInterceptorSupport
extends Object
implements Interceptor, ConfigurableComponent

Base class for developing Interceptors with dependencies on Spring managed beans. Not to be confused with SpringInterceptor which injects Spring managed beans into ActionBeans. For example, you may wish to subclass this class in order to write an interceptor with access to Spring managed DAOs or security information.

Since Interceptors are long-lived objects that are instantiated at application startup time, and not per-request, the spring wiring takes place in the init() method and happens only once when the interceptor is first created and initialized.

Since:
Stripes 1.4
Author:
Tim Fennell

Constructor Summary
SpringInterceptorSupport()
           
 
Method Summary
 void init(Configuration configuration)
          Fetches the ServletContext and invokes SpringHelper.injectBeans() to auto-wire any Spring dependencies prior to being placed into service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sourceforge.stripes.controller.Interceptor
intercept
 

Constructor Detail

SpringInterceptorSupport

public SpringInterceptorSupport()
Method Detail

init

public void init(Configuration configuration)
          throws Exception
Fetches the ServletContext and invokes SpringHelper.injectBeans() to auto-wire any Spring dependencies prior to being placed into service.

Specified by:
init in interface ConfigurableComponent
Parameters:
configuration - the Stripes Configuration
Throws:
Exception - if there are problems with the Spring configuration/wiring


? Copyright 2005-2006, Stripes Development Team.