net.sf.tie.ext.factory
Class SimpleInterceptorFactory

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

public class SimpleInterceptorFactory
extends Object
implements InterceptorFactory

The SimpleInterceptorFactory adapts a pre-constructed MethodInterceptor to be an InterceptorFactory. The getInterceptor(Class, Object) method will return the same object on each invocation (i.e. the MethodInterceptor provided to the constructor.


Constructor Summary
SimpleInterceptorFactory(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

SimpleInterceptorFactory

public SimpleInterceptorFactory(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