jodd.madvoc.interceptor
Class InterceptorsManager

java.lang.Object
  extended by jodd.madvoc.interceptor.InterceptorsManager
Direct Known Subclasses:
PetiteInterceptorManager

public class InterceptorsManager
extends java.lang.Object

Manager for Madvoc interceptors. By default, all interceptors are pooled so there will be only one instance per its type.


Field Summary
protected  java.util.Map<java.lang.Class<? extends ActionInterceptor>,ActionInterceptor> interceptors
           
protected  WebApplication webapp
           
 
Constructor Summary
InterceptorsManager(WebApplication webapp)
           
 
Method Summary
protected  ActionInterceptor createInterceptor(java.lang.Class<? extends ActionInterceptor> interceptorClass)
          Creates new ActionInterceptor.
protected  java.lang.Class<? extends ActionInterceptor>[] expand(java.lang.Class<? extends ActionInterceptor>[] actionInterceptors)
          Expands all DefaultWebAppInterceptors and ActionInterceptorStack in action interceptor array, by replacing them with real values.
 ActionInterceptor lookup(java.lang.Class<? extends ActionInterceptor> interceptorClass)
          Looks up for existing interceptor.
 ActionInterceptor resolve(java.lang.Class<? extends ActionInterceptor> interceptorClass)
          Resolves single interceptor.
 ActionInterceptor[] resolveAll(java.lang.Class<? extends ActionInterceptor>... interceptorClasses)
          Resolves interceptors.
 void resolveInterceptors(ActionConfig cfg)
          Resolves all provided interceptors and returns their instances.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

webapp

protected final WebApplication webapp

interceptors

protected java.util.Map<java.lang.Class<? extends ActionInterceptor>,ActionInterceptor> interceptors
Constructor Detail

InterceptorsManager

public InterceptorsManager(WebApplication webapp)
Method Detail

lookup

public ActionInterceptor lookup(java.lang.Class<? extends ActionInterceptor> interceptorClass)
Looks up for existing interceptor. Returns null if interceptor is not already registered.


resolve

public ActionInterceptor resolve(java.lang.Class<? extends ActionInterceptor> interceptorClass)
Resolves single interceptor.


resolveAll

public ActionInterceptor[] resolveAll(java.lang.Class<? extends ActionInterceptor>... interceptorClasses)
Resolves interceptors. Unregistered interceptors will be registered. Returned array may be different size than size of provided array, due to expanding.


resolveInterceptors

public void resolveInterceptors(ActionConfig cfg)
Resolves all provided interceptors and returns their instances.


expand

protected java.lang.Class<? extends ActionInterceptor>[] expand(java.lang.Class<? extends ActionInterceptor>[] actionInterceptors)
Expands all DefaultWebAppInterceptors and ActionInterceptorStack in action interceptor array, by replacing them with real values.


createInterceptor

protected ActionInterceptor createInterceptor(java.lang.Class<? extends ActionInterceptor> interceptorClass)
Creates new ActionInterceptor.



Copyright ©2008 Jodd Team