Package org.apache.tuscany.core.builder

Examples of org.apache.tuscany.core.builder.ConnectorImpl.connect()


        AtomicComponent sourceComponent = builder.build(parent, sourceComponentDefinition, deploymentContext);
        Reference reference = bindingBuilder.build(parent, targetReferenceDefinition, deploymentContext);

        parent.register(sourceComponent);
        parent.register(reference);
        connector.connect(reference.getInboundWire(), reference.getOutboundWire(), true);
        connector.connect(sourceComponent);
        grandParent.register(parent);
        grandParent.start();
        scope.onEvent(new CompositeStart(this, parent));
        Source source = (Source) parent.getSystemChild("source").getServiceInstance();
View Full Code Here


        Reference reference = bindingBuilder.build(parent, targetReferenceDefinition, deploymentContext);

        parent.register(sourceComponent);
        parent.register(reference);
        connector.connect(reference.getInboundWire(), reference.getOutboundWire(), true);
        connector.connect(sourceComponent);
        grandParent.register(parent);
        grandParent.start();
        scope.onEvent(new CompositeStart(this, parent));
        Source source = (Source) parent.getSystemChild("source").getServiceInstance();
        assertNotNull(source);
View Full Code Here

        parent.register(sourceComponent);

        Service service = bindingBuilder.build(parent, serviceDefinition, deploymentContext);
        parent.register(service);

        connector.connect(sourceComponent);
        connector.connect(service);

        parent.start();
        scope.onEvent(new CompositeStart(this, parent));
        Target target = (Target) parent.getSystemChild("serviceDefinition").getServiceInstance();
View Full Code Here

        Service service = bindingBuilder.build(parent, serviceDefinition, deploymentContext);
        parent.register(service);

        connector.connect(sourceComponent);
        connector.connect(service);

        parent.start();
        scope.onEvent(new CompositeStart(this, parent));
        Target target = (Target) parent.getSystemChild("serviceDefinition").getServiceInstance();
        assertNotNull(target);
View Full Code Here

        inboundWire.setContainer(target);

        EasyMock.expect(parent.getChild("target")).andReturn(target);
        EasyMock.replay(parent);

        connector.connect(source);
        target.start();
        return outboundWire;
    }

    public static <T> OutboundWire createOutboundWire(QualifiedName targetName, Class<T> interfaze)
View Full Code Here

        builder.setBuilderRegistry(builderRegistry);
        CompositeComponent component =
            (CompositeComponent) builder.build(parent, createTopComponentDef(), deploymentContext);

        ConnectorImpl connector = new ConnectorImpl();
        connector.connect(component);

        deploymentContext.getModuleScope().start();
        component.start();
        CompositeComponent sourceComponent = (CompositeComponent) component.getChild("SourceComponent");
        Source source = (Source) sourceComponent.getServiceInstance("InnerSourceService");
View Full Code Here

        wireService.createWires(clientComponent, sourceDefinition);
        container.register(clientComponent);

        Connector connector = new ConnectorImpl(new JDKWireService(), null, scheduler , workContext);

        connector.connect(clientComponent);
        FooClient client = (FooClient) clientComponent.getServiceInstance();
        client.invoke();
        assertTrue(client.invoked);
    }
View Full Code Here

            (JavaAtomicComponent) builder.build(parent, sourceDefinition2, context);
        wireService.createWires(clientComponent2, sourceDefinition2);
        container.register(clientComponent2);

        Connector connector = new ConnectorImpl(new JDKWireService(), null, scheduler, workContext);
        connector.connect(clientComponent1);
        connector.connect(clientComponent2);
        FooClient client1 = (FooClient) clientComponent1.getServiceInstance();
        client1.invoke();
        assertTrue(client1.invoked);
        FooClient client2 = (FooClient) clientComponent2.getServiceInstance();
View Full Code Here

        wireService.createWires(clientComponent2, sourceDefinition2);
        container.register(clientComponent2);

        Connector connector = new ConnectorImpl(new JDKWireService(), null, scheduler, workContext);
        connector.connect(clientComponent1);
        connector.connect(clientComponent2);
        FooClient client1 = (FooClient) clientComponent1.getServiceInstance();
        client1.invoke();
        assertTrue(client1.invoked);
        FooClient client2 = (FooClient) clientComponent2.getServiceInstance();
        client2.invoke();
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.