Package org.apache.tuscany.sca.core.invocation

Examples of org.apache.tuscany.sca.core.invocation.JDKProxyFactory


                                     wire.getTarget().getContract().getName();
            targetProperties.put(COMPONENT_SERVICE_NAME, compServiceName);
        }
       
          
        JDKProxyFactory proxyService = new JDKProxyFactory();
             
        Class<?> proxyInterface = bundle.loadClass(interfaceClass.getName());
               

        Object proxy = proxyService.createProxy(proxyInterface, wire);
      
           
        bundleContext.registerService(proxyInterface.getName(), proxy, targetProperties);
           
       
View Full Code Here


        List<RuntimeWire> wires = service.getCallbackWires();
        Hashtable<String, Object> targetProperties = new Hashtable<String, Object>();
        processProperties(implementation.getServiceCallbackProperties(service.getName()), targetProperties);
        targetProperties.put(Constants.SERVICE_RANKING, Integer.MAX_VALUE);
         
        JDKProxyFactory proxyService = new JDKProxyFactory();
             
        Class<?> proxyInterface = bundle.loadClass(interfaceClass.getName());
               

        Object proxy = proxyService.createCallbackProxy(proxyInterface, wires);
      
           
        bundleContext.registerService(proxyInterface.getName(), proxy, targetProperties);
           
       
View Full Code Here

        // Determine the service business interface
        Class<?> serviceInterface = getTargetJavaClass(serviceContract.getInterface());

        // Create a Java proxy to the target service
        ProxyFactory proxyFactory = new JDKProxyFactory();
        Object proxy = proxyFactory.createProxy(serviceInterface, service.getRuntimeWire(binding));

        // Create and register a servlet for this service
        JSONRPCServiceServlet serviceServlet =
            new JSONRPCServiceServlet(binding, componentService, serviceContract, serviceInterface, proxy);
        String mapping = binding.getURI();
View Full Code Here

                                     wire.getTarget().getContract().getName();
            targetProperties.put(COMPONENT_SERVICE_NAME, compServiceName);
        }
       
          
        JDKProxyFactory proxyService = new JDKProxyFactory();
             
        Class<?> proxyInterface = bundle.loadClass(interfaceClass.getName());
               

        Object proxy = proxyService.createProxy(proxyInterface, wire);
      
           
        bundleContext.registerService(proxyInterface.getName(), proxy, targetProperties);
           
       
View Full Code Here

        List<RuntimeWire> wires = service.getCallbackWires();
        Hashtable<String, Object> targetProperties = new Hashtable<String, Object>();
        processProperties(implementation.getServiceCallbackProperties(service.getName()), targetProperties);
        targetProperties.put(Constants.SERVICE_RANKING, Integer.MAX_VALUE);
         
        JDKProxyFactory proxyService = new JDKProxyFactory();
             
        Class<?> proxyInterface = bundle.loadClass(interfaceClass.getName());
               

        Object proxy = proxyService.createCallbackProxy(proxyInterface, wires);
      
           
        bundleContext.registerService(proxyInterface.getName(), proxy, targetProperties);
           
       
View Full Code Here

                                     wire.getTarget().getContract().getName();
            targetProperties.put(COMPONENT_SERVICE_NAME, compServiceName);
        }


        JDKProxyFactory proxyService = new JDKProxyFactory(messageFactory, mapper);

        // Allow privileged access to load classes. Requires getClassLoader permission in security
        // policy.
        final Class<?> proxyInterface = AccessController.doPrivileged(new PrivilegedExceptionAction<Class<?>>() {
            public Class<?> run() throws Exception {
                return bundle.loadClass(interfaceClass.getName());
            }
        });

        final Object proxy = proxyService.createProxy(proxyInterface, wire);
        final Hashtable<String, Object> finalTargetProperties = targetProperties;
        AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
            public Object run() throws Exception {
                bundleContext.registerService(proxyInterface.getName(), proxy, finalTargetProperties);
                return null;
View Full Code Here

                                     wire.getTarget().getContract().getName();
            targetProperties.put(COMPONENT_SERVICE_NAME, compServiceName);
        }


        JDKProxyFactory proxyService = new JDKProxyFactory(messageFactory, mapper);

        // Allow privileged access to load classes. Requires getClassLoader permission in security
        // policy.
        final Class<?> proxyInterface = AccessController.doPrivileged(new PrivilegedExceptionAction<Class<?>>() {
            public Class<?> run() throws Exception {
                return bundle.loadClass(interfaceClass.getName());
            }
        });

        final Object proxy = proxyService.createProxy(proxyInterface, wire);
        final Hashtable<String, Object> finalTargetProperties = targetProperties;
        AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
            public Object run() throws Exception {
                bundleContext.registerService(proxyInterface.getName(), proxy, finalTargetProperties);
                return null;
View Full Code Here

                                     wire.getTarget().getContract().getName();
            targetProperties.put(COMPONENT_SERVICE_NAME, compServiceName);
        }
       
          
        JDKProxyFactory proxyService = new JDKProxyFactory(messageFactory, mapper);

        // Allow privileged access to load classes. Requires getClassLoader permission in security
        // policy.
        final Class<?> proxyInterface = AccessController.doPrivileged(new PrivilegedExceptionAction<Class<?>>() {
            public Class<?> run() throws Exception {
                return bundle.loadClass(interfaceClass.getName());
            }
        });

        final Object proxy = proxyService.createProxy(proxyInterface, wire);
        final Hashtable<String, Object> finalTargetProperties = targetProperties;
        AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
            public Object run() throws Exception {
                bundleContext.registerService(proxyInterface.getName(), proxy, finalTargetProperties);
                return null;
View Full Code Here

        }
       
        Class<?> type = ((JavaInterface)rcs.getInterfaceContract().getInterface()).getJavaClass();

        // Create a Java proxy to the target service
        ProxyFactory proxyFactory = new JDKProxyFactory();
        Object proxy = proxyFactory.createProxy(type, rcs.getRuntimeWire(binding));

        servlet.addService(binding.getName(), type, proxy);

        servletHost.addServletMapping(SERVLET_PATH, servlet);
    }
View Full Code Here

       
        // Determine the service business interface
        Class<?> serviceInterface = getTargetJavaClass(service.getInterfaceContract().getInterface());

        // Create a Java proxy to the target service
        ProxyFactory proxyFactory = new JDKProxyFactory();
        Object proxy = proxyFactory.createProxy(serviceInterface, service.getRuntimeWire(binding));
       
        // Create and register a servlet for this service
        JSONRPCServiceServlet serviceServlet = new JSONRPCServiceServlet(binding.getName(), serviceInterface, proxy);
        int port;
        servletHost.addServletMapping(binding.getURI(), serviceServlet);
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.core.invocation.JDKProxyFactory

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.