jodd.madvoc.component
Class InterceptorsManager

java.lang.Object
  extended by jodd.madvoc.component.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  MadvocConfig madvocConfig
           
 
Constructor Summary
InterceptorsManager()
           
 
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.
 java.util.Map<java.lang.Class<? extends ActionInterceptor>,ActionInterceptor> getAllActionInterceptors()
          Returns all action results.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

madvocConfig

@PetiteInject
protected MadvocConfig madvocConfig

interceptors

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

InterceptorsManager

public InterceptorsManager()
Method Detail

getAllActionInterceptors

public java.util.Map<java.lang.Class<? extends ActionInterceptor>,ActionInterceptor> getAllActionInterceptors()
Returns all action results. Should be used with care.


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. Creates new interceptor instance if not already registered. Does not expand the interceptors.


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.


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 © 2003-2011 Jodd Team