net.sf.tie.ext.factory
Class DynamicInterceptorFactory

java.lang.Object
  extended by net.sf.tie.ext.factory.DynamicInterceptorFactory
All Implemented Interfaces:
InterceptorFactory

public class DynamicInterceptorFactory
extends Object
implements InterceptorFactory

Makes use of an InterceptionRule to facilitate the conditional inclusion of an interceptor.

See Also:
ConditionalInterceptor, MultiInterceptor

Constructor Summary
DynamicInterceptorFactory(InterceptionRule rule, MethodInterceptor interceptor)
           
 
Method Summary
<T> MethodInterceptor
getInterceptor(Class<T> type, T endPoint)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicInterceptorFactory

public DynamicInterceptorFactory(InterceptionRule rule,
                                 MethodInterceptor interceptor)
Method Detail

getInterceptor

public <T> MethodInterceptor getInterceptor(Class<T> type,
                                            T endPoint)
Specified by:
getInterceptor in interface InterceptorFactory
Returns:
The interceptor to be used for type and endPoint, or null if no interceptor is required. The interceptor may be specifically configured accordin to the arguments or, alternatively, the same interceptor may be returned for all invocations.
See Also:
ConditionalInterceptor, MultiInterceptor