Package org.jboss.invocation
Class MethodInterceptorFactory
- java.lang.Object
-
- org.jboss.invocation.MethodInterceptorFactory
-
- All Implemented Interfaces:
InterceptorFactory
public final class MethodInterceptorFactory extends Object implements InterceptorFactory
An interceptor factory for interceptor objects which call a specific method via reflection. If this factory is called more than once in the same context, it will return the same interceptor instance.- Author:
- David M. Lloyd
-
-
Field Summary
-
Fields inherited from interface org.jboss.invocation.InterceptorFactory
EMPTY_ARRAY
-
-
Constructor Summary
Constructors Constructor Description MethodInterceptorFactory(InterceptorInstanceFactory instanceFactory, Method interceptorMethod)Construct a new instance.MethodInterceptorFactory(InterceptorInstanceFactory instanceFactory, Method interceptorMethod, boolean changeMethod)Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Interceptorcreate(InterceptorFactoryContext context)Create the interceptor instance.
-
-
-
Constructor Detail
-
MethodInterceptorFactory
public MethodInterceptorFactory(InterceptorInstanceFactory instanceFactory, Method interceptorMethod, boolean changeMethod)
Construct a new instance.- Parameters:
instanceFactory- the instance factory for the interceptor instanceinterceptorMethod- the interceptor methodchangeMethod-trueto change the method on the context to equal the given method,falseto leave it as-is
-
MethodInterceptorFactory
public MethodInterceptorFactory(InterceptorInstanceFactory instanceFactory, Method interceptorMethod)
Construct a new instance.- Parameters:
instanceFactory- the instance factory for the interceptor instanceinterceptorMethod- the interceptor method
-
-
Method Detail
-
create
public Interceptor create(InterceptorFactoryContext context)
Create the interceptor instance.- Specified by:
createin interfaceInterceptorFactory- Parameters:
context- the interceptor factory context- Returns:
- the interceptor instance
-
-