Class DefaultInterceptionService

  • All Implemented Interfaces:
    InterceptionService

    @Singleton
    @Visibility(LOCAL)
    public class DefaultInterceptionService
    extends java.lang.Object
    implements InterceptionService
    A default implementation of the interception service using annotation to denote services that are to be intercepted and other annotations to match methods or constructors to interceptors
    • Constructor Detail

      • DefaultInterceptionService

        public DefaultInterceptionService()
    • Method Detail

      • orderMethods

        private java.util.List<ServiceHandle<org.aopalliance.intercept.MethodInterceptor>> orderMethods​(java.lang.reflect.Method method,
                                                                                                        java.util.List<ServiceHandle<org.aopalliance.intercept.MethodInterceptor>> current)
      • orderConstructors

        private java.util.List<ServiceHandle<org.aopalliance.intercept.ConstructorInterceptor>> orderConstructors​(java.lang.reflect.Constructor<?> constructor,
                                                                                                                  java.util.List<ServiceHandle<org.aopalliance.intercept.ConstructorInterceptor>> current)
      • getMethodInterceptors

        public java.util.List<org.aopalliance.intercept.MethodInterceptor> getMethodInterceptors​(java.lang.reflect.Method method)
        Description copied from interface: InterceptionService
        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
        Specified by:
        getMethodInterceptors in interface InterceptionService
        Parameters:
        method - A non-final method that may be intercepted
        Returns:
        if null (or an empty list) then this method should NOT be intercepted. Otherwise the list of interceptors to apply to this method
      • getConstructorInterceptors

        public java.util.List<org.aopalliance.intercept.ConstructorInterceptor> getConstructorInterceptors​(java.lang.reflect.Constructor<?> constructor)
        Description copied from interface: InterceptionService
        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
        Specified by:
        getConstructorInterceptors in interface InterceptionService
        Parameters:
        constructor - A constructor that may be intercepted
        Returns:
        if null (or an empty list) then this constructor should NOT be intercepted. Otherwise the list of interceptors to apply to this method