@Singleton @Visibility(value=LOCAL) public class DefaultInterceptionService extends java.lang.Object implements InterceptionService
Modifier and Type | Field and Description |
---|---|
private static IndexedFilter |
CONSTRUCTOR_FILTER |
private ServiceLocator |
locator |
private static IndexedFilter |
METHOD_FILTER |
private IterableProvider<InterceptorOrderingService> |
orderers |
Constructor and Description |
---|
DefaultInterceptionService() |
Modifier and Type | Method and Description |
---|---|
java.util.List<org.aopalliance.intercept.ConstructorInterceptor> |
getConstructorInterceptors(java.lang.reflect.Constructor<?> constructor)
The single chosen constructor of a service that passes the
InterceptionService.getDescriptorFilter() method will be passed
to this method to determine if it will intercepted |
Filter |
getDescriptorFilter()
If the returned filter returns true then the methods
of the service will be passed to
InterceptionService.getMethodInterceptors(Method)
to determine if a method should be intercepted and the
constructor of the service will be passed to
InterceptionService.getConstructorInterceptors(Constructor) to
determine if the constructor should be intercepted |
java.util.List<org.aopalliance.intercept.MethodInterceptor> |
getMethodInterceptors(java.lang.reflect.Method method)
Each non-final method of a service that passes the
InterceptionService.getDescriptorFilter() method will be passed
to this method to determine if it will intercepted |
private java.util.List<ServiceHandle<org.aopalliance.intercept.ConstructorInterceptor>> |
orderConstructors(java.lang.reflect.Constructor<?> constructor,
java.util.List<ServiceHandle<org.aopalliance.intercept.ConstructorInterceptor>> current) |
private java.util.List<ServiceHandle<org.aopalliance.intercept.MethodInterceptor>> |
orderMethods(java.lang.reflect.Method method,
java.util.List<ServiceHandle<org.aopalliance.intercept.MethodInterceptor>> current) |
private static final IndexedFilter METHOD_FILTER
private static final IndexedFilter CONSTRUCTOR_FILTER
@Inject private ServiceLocator locator
@Inject private IterableProvider<InterceptorOrderingService> orderers
public Filter getDescriptorFilter()
InterceptionService
InterceptionService.getMethodInterceptors(Method)
to determine if a method should be intercepted and the
constructor of the service will be passed to
InterceptionService.getConstructorInterceptors(Constructor)
to
determine if the constructor should be interceptedgetDescriptorFilter
in interface InterceptionService
private java.util.List<ServiceHandle<org.aopalliance.intercept.MethodInterceptor>> orderMethods(java.lang.reflect.Method method, java.util.List<ServiceHandle<org.aopalliance.intercept.MethodInterceptor>> current)
private java.util.List<ServiceHandle<org.aopalliance.intercept.ConstructorInterceptor>> orderConstructors(java.lang.reflect.Constructor<?> constructor, java.util.List<ServiceHandle<org.aopalliance.intercept.ConstructorInterceptor>> current)
public java.util.List<org.aopalliance.intercept.MethodInterceptor> getMethodInterceptors(java.lang.reflect.Method method)
InterceptionService
InterceptionService.getDescriptorFilter()
method will be passed
to this method to determine if it will interceptedgetMethodInterceptors
in interface InterceptionService
method
- A non-final method that may
be interceptedpublic java.util.List<org.aopalliance.intercept.ConstructorInterceptor> getConstructorInterceptors(java.lang.reflect.Constructor<?> constructor)
InterceptionService
InterceptionService.getDescriptorFilter()
method will be passed
to this method to determine if it will interceptedgetConstructorInterceptors
in interface InterceptionService
constructor
- A constructor that may
be intercepted