public abstract class SpringInterceptorSupport extends java.lang.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.
Constructor and Description |
---|
SpringInterceptorSupport() |
Modifier and Type | Method and Description |
---|---|
void |
init(Configuration configuration)
Fetches the ServletContext and invokes SpringHelper.injectBeans() to auto-wire any
Spring dependencies prior to being placed into service.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
intercept
public void init(Configuration configuration) throws java.lang.Exception
init
in interface ConfigurableComponent
configuration
- the Stripes Configurationjava.lang.Exception
- if there are problems with the Spring configuration/wiring? Copyright 2005-2006, Stripes Development Team.