org.apache.beehive.netui.pageflow.interceptor
Class InterceptorContext

Object
  extended by InterceptorContext
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
RequestInterceptorContext

public class InterceptorContext
extends Object
implements Serializable

Context object that encapsulates the configuration for an entire interceptor chain.

See Also:
Serialized Form

Constructor Summary
InterceptorContext()
           
 
Method Summary
protected static Interceptor addInterceptor(InterceptorConfig config, Class baseClassOrInterface, List interceptors)
          Instantiates an interceptor, based on the class name in the given InterceptorConfig, and adds it to the given collection of interceptors.
protected static void addInterceptors(InterceptorConfig[] configBeans, List interceptorsList, Class baseClassOrInterface)
          Add an Interceptor to the list of interceptors.
protected static Interceptor createInterceptor(InterceptorConfig config, Class baseClassOrInterface)
          Instantiates an interceptor using the class name in the given InterceptorConfig.
 Interceptor getOverridingInterceptor()
           
 Object getResultOverride()
           
 boolean hasResultOverride()
           
 void setResultOverride(Object newResult, Interceptor interceptor)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InterceptorContext

public InterceptorContext()
Method Detail

setResultOverride

public void setResultOverride(Object newResult,
                              Interceptor interceptor)

hasResultOverride

public boolean hasResultOverride()

getResultOverride

public Object getResultOverride()

getOverridingInterceptor

public Interceptor getOverridingInterceptor()

addInterceptors

protected static void addInterceptors(InterceptorConfig[] configBeans,
                                      List interceptorsList,
                                      Class baseClassOrInterface)
Add an Interceptor to the list of interceptors.

Parameters:
configBeans - an array of JavaBeans that configure a set of interceptors
interceptorsList - the list of Interceptor instances
baseClassOrInterface -

addInterceptor

protected static Interceptor addInterceptor(InterceptorConfig config,
                                            Class baseClassOrInterface,
                                            List interceptors)
Instantiates an interceptor, based on the class name in the given InterceptorConfig, and adds it to the given collection of interceptors.

Parameters:
config - the InterceptorConfig used to determine the interceptor class.
baseClassOrInterface - the required base class or interface. May be null.
interceptors - the List of interceptors to which to add.
Returns:
an initialized Interceptor, or null if an error occurred.

createInterceptor

protected static Interceptor createInterceptor(InterceptorConfig config,
                                               Class baseClassOrInterface)
Instantiates an interceptor using the class name in the given InterceptorConfig.

Parameters:
config - the InterceptorConfig used to determine the Interceptor class.
baseClassOrInterface - the required base class or interface. May be null.
Returns:
an initialized Interceptor, or null if an error occurred.