Examples of EntryPointContextFactory


Examples of org.apache.tuscany.core.builder.impl.EntryPointContextFactory

        EntryPoint entryPoint = (EntryPoint) object;
        if (entryPoint.getBindings().size() < 1 || !(entryPoint.getBindings().get(0) instanceof JbiBinding)) {
            return;
        }

        EntryPointContextFactory config = new JbiServiceEntryPointContextFactory(entryPoint.getName(), entryPoint.getConfiguredService().getService().getName(), messageFactory);

        ConfiguredService configuredService = entryPoint.getConfiguredService();
        Service service = configuredService.getService();
        ServiceContract serviceContract = service.getServiceContract();
        Map<Method, InvocationConfiguration> iConfigMap = new HashMap<Method, InvocationConfiguration>();
        ProxyFactory proxyFactory = proxyFactoryFactory.createProxyFactory();
        Set<Method> javaMethods = JavaIntrospectionHelper.getAllUniqueMethods(serviceContract.getInterface());
        for (Method method : javaMethods) {
            InvocationConfiguration iConfig = new InvocationConfiguration(method);
            iConfigMap.put(method, iConfig);
        }
        QualifiedName qName = new QualifiedName(entryPoint.getConfiguredReference().getTargetConfiguredServices().get(0).getAggregatePart().getName() + "/" + service.getName());
        ProxyConfiguration pConfiguration = new ProxyConfiguration(qName, iConfigMap, serviceContract.getInterface().getClassLoader(), messageFactory);
        proxyFactory.setBusinessInterface(serviceContract.getInterface());
        proxyFactory.setProxyConfiguration(pConfiguration);
        config.addSourceProxyFactory(service.getName(), proxyFactory);
        configuredService.setProxyFactory(proxyFactory);
        if (policyBuilder != null) {
            // invoke the reference builder to handle additional policy metadata
            policyBuilder.build(configuredService);
        }
View Full Code Here

Examples of org.apache.tuscany.core.builder.impl.EntryPointContextFactory

        EntryPoint entryPoint = (EntryPoint) object;
        if (entryPoint.getBindings().size() < 1 || !(entryPoint.getBindings().get(0) instanceof JbiBinding)) {
            return;
        }

        EntryPointContextFactory config = new JbiServiceEntryPointContextFactory(entryPoint.getName(), entryPoint.getConfiguredService().getService().getName(), messageFactory);

        ConfiguredService configuredService = entryPoint.getConfiguredService();
        Service service = configuredService.getService();
        ServiceContract serviceContract = service.getServiceContract();
        Map<Method, InvocationConfiguration> iConfigMap = new HashMap<Method, InvocationConfiguration>();
        ProxyFactory proxyFactory = proxyFactoryFactory.createProxyFactory();
        Set<Method> javaMethods = JavaIntrospectionHelper.getAllUniqueMethods(serviceContract.getInterface());
        for (Method method : javaMethods) {
            InvocationConfiguration iConfig = new InvocationConfiguration(method);
            iConfigMap.put(method, iConfig);
        }
        QualifiedName qName = new QualifiedName(entryPoint.getConfiguredReference().getTargetConfiguredServices().get(0).getAggregatePart().getName() + "/" + service.getName());
        ProxyConfiguration pConfiguration = new ProxyConfiguration(qName, iConfigMap, serviceContract.getInterface().getClassLoader(), messageFactory);
        proxyFactory.setBusinessInterface(serviceContract.getInterface());
        proxyFactory.setProxyConfiguration(pConfiguration);
        config.addSourceProxyFactory(service.getName(), proxyFactory);
        configuredService.setProxyFactory(proxyFactory);
        if (policyBuilder != null) {
            // invoke the reference builder to handle additional policy metadata
            policyBuilder.build(configuredService);
        }
View Full Code Here

Examples of org.apache.tuscany.core.extension.EntryPointContextFactory

        if (object instanceof EntryPoint) {
            EntryPoint ep = (EntryPoint) object;
            if (ep.getBindings().size() < 1 || !(ep.getBindings().get(0) instanceof FooBinding)) {
                return;
            }
            EntryPointContextFactory contextFactory = new FooEntryPointContextFactory(ep.getName(), messageFactory);
            ConfiguredService configuredService = ep.getConfiguredService();
            Service service = configuredService.getPort();
            SourceWireFactory wireFactory = wireFactoryService.createSourceFactory(ep.getConfiguredReference()).get(0);
            contextFactory.addSourceWireFactory(service.getName(), wireFactory);
            ep.setContextFactory(contextFactory);
        } else if (object instanceof ExternalService) {
            ExternalService es = (ExternalService) object;
            if (es.getBindings().size() < 1 || !(es.getBindings().get(0) instanceof FooBinding)) {
                return;
            }
            FooExternalServiceContextFactory contextFactory = new FooExternalServiceContextFactory(es.getName(),
                    new FooClientFactory());
            ConfiguredService configuredService = es.getConfiguredService();
            Service service = configuredService.getPort();
            TargetWireFactory wireFactory = wireFactoryService.createTargetFactory(configuredService);
            contextFactory.addTargetWireFactory(service.getName(), wireFactory);
            es.setContextFactory(contextFactory);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.