Package org.springframework.aop.support

Examples of org.springframework.aop.support.DelegatingIntroductionInterceptor


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

        DelegatingIntroductionInterceptor introduction = new DelegatingIntroductionInterceptor(ts);
        introduction.suppressInterface(TargetSource.class);
        if (ts instanceof ReplaceAndRefreshableScriptTargetSource) {
            proxyFactory.addAdvice(new ScriptReplaceClassInfoMethodInterceptor());
        }
        proxyFactory.addAdvice(introduction);
        return proxyFactory.getProxy(classLoader);
View Full Code Here


        }

        // Add an introduction that implements only the methods on ScopedObject.
        // Not sure if this is useful...
        ScopedObject scopedObject = new DefaultScopedObject(cbf, 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.
        // Not sure if this is needed....
        pf.addInterface(AopInfrastructureBean.class);
View Full Code Here

        }

        // Add an introduction that implements only the methods on ScopedObject.
        // Not sure if this is useful...
        ScopedObject scopedObject = new DefaultScopedObject(cbf, 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.
        // Not sure if this is needed....
        pf.addInterface(AopInfrastructureBean.class);
View Full Code Here

    tb.setName(name);
    ProxyFactory pc = new ProxyFactory(tb);
    NopInterceptor di = new NopInterceptor();
    pc.addAdvice(di);
    final long ts = 37;
    pc.addAdvice(new DelegatingIntroductionInterceptor(new TimeStamped() {
      @Override
      public long getTimeStamp() {
        return ts;
      }
    }));
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

   * @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

  /**
   * @param dii
   */
  public TimestampIntroductionAdvisor() {
    super(new DelegatingIntroductionInterceptor(new TimestampIntroductionInterceptor()));
  }
View Full Code Here

   */
  @Override
  public MessageEndpoint createEndpoint(XAResource xaResource) throws UnavailableException {
    GenericMessageEndpoint endpoint = (GenericMessageEndpoint) super.createEndpoint(xaResource);
    ProxyFactory proxyFactory = new ProxyFactory(this.messageListener);
    DelegatingIntroductionInterceptor introduction = new DelegatingIntroductionInterceptor(endpoint);
    introduction.suppressInterface(MethodInterceptor.class);
    proxyFactory.addAdvice(introduction);
    return (MessageEndpoint) proxyFactory.getProxy();
  }
View Full Code Here

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

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

    return proxyFactory.getProxy(this.beanClassLoader);
  }
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.