Package org.springframework.aop.framework

Examples of org.springframework.aop.framework.ProxyFactory


        super.init();
    }

    protected Object maybeGetProxy(ServiceRegistryEntry reference) {
        final StaticServiceReferenceProxyFactorySource proxyFactorySource = new StaticServiceReferenceProxyFactorySource(getProxyTypes(), reference);
        final ProxyFactory proxyFactory = this.proxyFactoryCreator.createProxyFactory(proxyFactorySource, beanName, null);
        return proxyFactory.getProxy();
    }
View Full Code Here


        super.init();
    }

    protected Object maybeGetProxy(ServiceRegistryEntry reference) {
        final StaticServiceReferenceProxyFactorySource proxyFactorySource = new StaticServiceReferenceProxyFactorySource(getProxyTypes(), reference);
        final ProxyFactory proxyFactory = this.proxyFactoryCreator.createProxyFactory(proxyFactorySource, beanName, null);
        return proxyFactory.getProxy();
    }
View Full Code Here

      }
    } else {
      filteredInterfaces.addAll(interfaces);
    }
   
    ProxyFactory proxyFactory = new ProxyFactory();
    proxyFactory.setInterfaces(filteredInterfaces.toArray(new Class[0]));
    proxyFactory.setTarget(bean);
    final Object proxyObject = proxyFactory.getProxy();
    return proxyObject;
  }
View Full Code Here

        super.init();
    }

    protected Object maybeGetProxy(ServiceRegistryEntry reference) {
        final StaticServiceReferenceProxyFactorySource proxyFactorySource = new StaticServiceReferenceProxyFactorySource(getProxyTypes(), reference);
        final ProxyFactory proxyFactory = this.proxyFactoryCreator.createProxyFactory(proxyFactorySource, beanName);
        return proxyFactory.getProxy();
    }
View Full Code Here

        super.init();
    }

    protected Object maybeGetProxy(ServiceRegistryEntry reference) {
        final StaticServiceReferenceProxyFactorySource proxyFactorySource = new StaticServiceReferenceProxyFactorySource(getProxyTypes(), reference);
        final ProxyFactory proxyFactory = this.proxyFactoryCreator.createProxyFactory(proxyFactorySource, beanName);
        return proxyFactory.getProxy();
    }
View Full Code Here

        super.init();
    }

    protected Object maybeGetProxy(ServiceRegistryEntry reference) {
        final StaticServiceReferenceProxyFactorySource proxyFactorySource = new StaticServiceReferenceProxyFactorySource(getProxyTypes(), reference);
        final ProxyFactory proxyFactory = this.proxyFactoryCreator.createProxyFactory(proxyFactorySource, beanName);
        return proxyFactory.getProxy();
    }
View Full Code Here

  public void afterPropertiesSet() throws Exception {
   
    String registryKeyName = (exportedBeanName != null ? exportedBeanName : beanName);
    targetSource = new ServiceRegistryTargetSource(registryKeyName, serviceRegistry);
   
    this.proxyFactory = new ProxyFactory();
    for (int i = 0; i < interfaces.length; i++) {
      if (logger.isDebugEnabled()) {
        logger.debug("Adding interface " + interfaces[i] + " loaded from " + interfaces[i].getClassLoader());
      }
      proxyFactory.addInterface(interfaces[i]);
View Full Code Here

        if (filteredInterfaces.size() == 0) {
            logger.warn("Bean of instance " + bean.getClass().getName() + " does not implement any of the specified interfaces: " + proxyInterfaces);
            return bean;
        }
       
        ProxyFactory proxyFactory = new ProxyFactory();
        proxyFactory.setInterfaces(filteredInterfaces.toArray(new Class[0]));
        proxyFactory.setTarget(bean);
        final Object proxyObject = proxyFactory.getProxy();
        return proxyObject;
    }
View Full Code Here

     * @param the bean for which the proxy is being created.
     */
    public final ProxyFactory createProxyFactory(ProxyFactorySource proxyFactorySource, String beanName) {
       
        proxyFactorySource.init();
        ProxyFactory proxyFactory = proxyFactorySource.getProxyFactory();
        ServiceEndpointTargetSource targetSource = proxyFactorySource.getTargetSource();
       
        addInterceptor(beanName, proxyFactory, targetSource);
       
        return proxyFactory;
View Full Code Here

        Assert.notNull(exportTypes, "Export types cannot be null for " + TypedServiceProxyFactoryBean.class);
       
        //note that if proxy types are supplied, they will be used for proxies instead of export types
        BeanRetrievingProxyFactorySource source = new BeanRetrievingProxyFactorySource(super.getServiceRegistry(), proxyTypes, exportTypes, exportName);
       
        ProxyFactory createDynamicProxyFactory = getProxyFactoryCreator().createProxyFactory(source, getBeanName());
        return createDynamicProxyFactory;
    }
View Full Code Here

TOP

Related Classes of org.springframework.aop.framework.ProxyFactory

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.