net.sf.tie.ext.factory
Class SimpleInterceptorFactory
java.lang.Object
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.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleInterceptorFactory
public SimpleInterceptorFactory(MethodInterceptor interceptor)
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