Package org.springframework.aop.support

Examples of org.springframework.aop.support.DelegatingIntroductionInterceptor


  /**
   * Return an introduction advisor mixin that allows the AOP proxy to be
   * cast to ThreadLocalInvokerStats.
   */
  public IntroductionAdvisor getStatsMixin() {
    DelegatingIntroductionInterceptor dii = new DelegatingIntroductionInterceptor(this);
    return new DefaultIntroductionAdvisor(dii, ThreadLocalTargetSourceStats.class);
  }
View Full Code Here


  /**
   * Return an IntroductionAdvisor that providing a mixin
   * exposing statistics about the pool maintained by this object.
   */
  public DefaultIntroductionAdvisor getPoolingConfigMixin() {
    DelegatingIntroductionInterceptor dii = new DelegatingIntroductionInterceptor(this);
    return new DefaultIntroductionAdvisor(dii, PoolingConfig.class);
  }
View Full Code Here

   * @param typePattern type pattern the introduction is restricted to
   * @param delegateRef the delegate implementation object
   */
  public DeclareParentsAdvisor(Class interfaceType, String typePattern, Object delegateRef) {
    this(interfaceType, typePattern, delegateRef.getClass(),
       new DelegatingIntroductionInterceptor(delegateRef));
  }
View Full Code Here

      pf.setInterfaces(ClassUtils.getAllInterfacesForClass(beanType, cbf.getBeanClassLoader()));
    }

    // Add an introduction that implements only the methods on ScopedObject.
    ScopedObject scopedObject = new DefaultScopedObject(cbf, this.scopedTargetSource.getTargetBeanName());
    pf.addAdvice(new DelegatingIntroductionInterceptor(scopedObject));

    // Add the AopInfrastructureBean marker to indicate that the scoped proxy
    // itself is not subject to auto-proxying! Only its target bean is.
    pf.addInterface(AopInfrastructureBean.class);
View Full Code Here

    if (interfaces == null) {
      interfaces = ClassUtils.getAllInterfacesForClass(ts.getTargetClass());
    }
    proxyFactory.setInterfaces(interfaces);

    DelegatingIntroductionInterceptor introduction = new DelegatingIntroductionInterceptor(ts);
    introduction.suppressInterface(TargetSource.class);
    proxyFactory.addAdvice(introduction);

    return proxyFactory.getProxy(this.beanClassLoader);
  }
View Full Code Here

  /**
   * Return an introduction advisor mixin that allows the AOP proxy to be
   * cast to ThreadLocalInvokerStats.
   */
  public IntroductionAdvisor getStatsMixin() {
    DelegatingIntroductionInterceptor dii = new DelegatingIntroductionInterceptor(this);
    return new DefaultIntroductionAdvisor(dii, ThreadLocalTargetSourceStats.class);
  }
View Full Code Here

  /**
   * Return an introduction advisor mixin that allows the AOP proxy to be
   * cast to ThreadLocalInvokerStats.
   */
  public IntroductionAdvisor getStatsMixin() {
    DelegatingIntroductionInterceptor dii = new DelegatingIntroductionInterceptor(this);
    return new DefaultIntroductionAdvisor(dii, ThreadLocalTargetSourceStats.class);
  }
View Full Code Here

  /**
   * Return an IntroductionAdvisor that providing a mixin
   * exposing statistics about the pool maintained by this object.
   */
  public DefaultIntroductionAdvisor getPoolingConfigMixin() {
    DelegatingIntroductionInterceptor dii = new DelegatingIntroductionInterceptor(this);
    return new DefaultIntroductionAdvisor(dii, PoolingConfig.class);
  }
View Full Code Here

    if (proxyTargetClass) {
      classLoader = null; // Force use of Class.getClassLoader()
      proxyFactory.setProxyTargetClass(proxyTargetClass);
    }

    DelegatingIntroductionInterceptor introduction = new DelegatingIntroductionInterceptor(ts);
    introduction.suppressInterface(TargetSource.class);
    proxyFactory.addAdvice(introduction);

    return proxyFactory.getProxy(classLoader);
  }
View Full Code Here

      pf.setInterfaces(ClassUtils.getAllInterfacesForClass(beanType, cbf.getBeanClassLoader()));
    }

    // Add an introduction that implements only the methods on ScopedObject.
    ScopedObject scopedObject = new DefaultScopedObject(cbf, this.scopedTargetSource.getTargetBeanName());
    pf.addAdvice(new DelegatingIntroductionInterceptor(scopedObject));

    // Add the AopInfrastructureBean marker to indicate that the scoped proxy
    // itself is not subject to auto-proxying! Only its target bean is.
    pf.addInterface(AopInfrastructureBean.class);
View Full Code Here

TOP

Related Classes of org.springframework.aop.support.DelegatingIntroductionInterceptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.