Package org.apache.tuscany.core.system.assembly

Examples of org.apache.tuscany.core.system.assembly.SystemBinding


            return;
        } else if (externalService.getBindings() == null || externalService.getBindings().size() < 1
                || !(externalService.getBindings().get(0) instanceof SystemBinding)) {
            return;
        }
        SystemBinding binding = (SystemBinding)externalService.getBindings().get(0);
        if (binding.getTargetName() != null) {
            SystemExternalServiceContextFactory contextFactory = new SystemExternalServiceContextFactory(externalService
                    .getName(), new InterCompositeReferenceFactory(binding.getTargetName()));
            externalService.setContextFactory(contextFactory);
        } else if (externalService.getConfiguredService().getPort().getServiceContract().getInterface() != null) {
            // autowire
            Class<Object> claz = externalService.getConfiguredService().getPort().getServiceContract().getInterface();
            if (claz == null) {
View Full Code Here


    public static ExternalService createESSystemBinding(String name, String refName) {
        ExternalService es = systemFactory.createExternalService();
        es.setName(name);
        ConfiguredService configuredService = systemFactory.createConfiguredService();
        es.setConfiguredService(configuredService);
        SystemBinding binding = systemFactory.createSystemBinding();
        binding.setTargetName(refName);
        es.getBindings().add(binding);
        es.initialize(null);
        return es;
    }
View Full Code Here

        service.setServiceContract(contract);
        ConfiguredService cService = factory.createConfiguredService();
        cService.setPort(service);
        cService.initialize(assemblyContext);
        ep.setConfiguredService(cService);
        SystemBinding binding = factory.createSystemBinding();
        ep.getBindings().add(binding);
        ConfiguredReference cEpRef = factory.createConfiguredReference();
        Reference epRef = factory.createReference();
        cEpRef.setPort(epRef);
        ep.setConfiguredReference(cEpRef);
View Full Code Here

        return SYSTEM_BINDING;
    }

    public SystemBinding load(XMLStreamReader reader, LoaderContext loaderContext) throws XMLStreamException, ConfigurationLoadException {
        assert SystemBindingLoader.SYSTEM_BINDING.equals(reader.getName());
        SystemBinding binding = factory.createSystemBinding();
        StAXUtil.skipToEndElement(reader);
        return binding;
    }
View Full Code Here

        ConfiguredService epCService = systemFactory.createConfiguredService();
        epCService.initialize(assemblyContext);
        epCService.setPort(epService);

        ep.setConfiguredService(epCService);
        SystemBinding binding = systemFactory.createSystemBinding();
        ep.getBindings().add(binding);
        if (target != null) {
            if (target instanceof Component) {
                ((Component) target).getConfiguredServices().add(cService);
                // cService.
View Full Code Here

    public static ExternalService createESSystemBinding(String name, String refName) {
        ExternalService es = systemFactory.createExternalService();
        es.setName(name);
        ConfiguredService configuredService = systemFactory.createConfiguredService();
        es.setConfiguredService(configuredService);
        SystemBinding binding = systemFactory.createSystemBinding();
        binding.setTargetName(refName);
        es.getBindings().add(binding);
        es.initialize(null);
        return es;
    }
View Full Code Here

        return sc;
    }

    public EntryPoint createSystemEntryPoint(String entryPointName, Class<?> serviceContract, String targetName) {
        // create the system binding
        SystemBinding systemBinding = createSystemBinding();

        // define the EP's service contract
        JavaServiceContract javaServiceContract = createJavaServiceContract();
        javaServiceContract.setInterface(serviceContract);
View Full Code Here

TOP

Related Classes of org.apache.tuscany.core.system.assembly.SystemBinding

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.