Package org.springframework.aop.support

Examples of org.springframework.aop.support.DefaultIntroductionAdvisor


   * 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

  public void addAdvice(int pos, Advice advice) throws AopConfigException {
    Assert.notNull(advice, "Advice must not be null");
    if (advice instanceof IntroductionInfo) {
      // We don't need an IntroductionAdvisor for this kind of introduction:
      // It's fully self-describing.
      addAdvisor(pos, new DefaultIntroductionAdvisor(advice, (IntroductionInfo) advice));
    }
    else if (advice instanceof DynamicIntroductionAdvice) {
      // We need an IntroductionAdvisor for this kind of introduction.
      throw new AopConfigException("DynamicIntroductionAdvice may only be added as part of IntroductionAdvisor");
    }
View Full Code Here

   * the NamedBean interface to make the bean name accessible without forcing
   * the target object to be aware of this Spring IoC concept.
   * @param beanName the bean name to expose
   */
  public static Advisor createAdvisorIntroducingNamedBean(String beanName) {
    return new DefaultIntroductionAdvisor(new ExposeBeanNameIntroduction(beanName));
  }
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

   * the NamedBean interface to make the bean name accessible without forcing
   * the target object to be aware of this Spring IoC concept.
   * @param beanName the bean name to expose
   */
  public static Advisor createAdvisorIntroducingNamedBean(String beanName) {
    return new DefaultIntroductionAdvisor(new ExposeBeanNameIntroduction(beanName));
  }
View Full Code Here

  public void addAdvice(int pos, Advice advice) throws AopConfigException {
    Assert.notNull(advice, "Advice must not be null");
    if (advice instanceof IntroductionInfo) {
      // We don't need an IntroductionAdvisor for this kind of introduction:
      // It's fully self-describing.
      addAdvisor(pos, new DefaultIntroductionAdvisor(advice, (IntroductionInfo) advice));
    }
    else if (advice instanceof DynamicIntroductionAdvice) {
      // We need an IntroductionAdvisor for this kind of introduction.
      throw new AopConfigException("DynamicIntroductionAdvice may only be added as part of IntroductionAdvisor");
    }
View Full Code Here

  public void addAdvice(int pos, Advice advice) throws AopConfigException {
    Assert.notNull(advice, "Advice must not be null");
    if (advice instanceof IntroductionInfo) {
      // We don't need an IntroductionAdvisor for this kind of introduction:
      // It's fully self-describing.
      addAdvisor(pos, new DefaultIntroductionAdvisor(advice, (IntroductionInfo) advice));
    }
    else if (advice instanceof DynamicIntroductionAdvice) {
      // We need an IntroductionAdvisor for this kind of introduction.
      throw new AopConfigException("DynamicIntroductionAdvice may only be added as part of IntroductionAdvisor");
    }
View Full Code Here

TOP

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

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.