Package org.apache.tuscany.core.implementation.system.wire

Examples of org.apache.tuscany.core.implementation.system.wire.SystemInboundWire


        processProperties(propertyValues, componentType.getProperties().values(), component);
        // handle inbound wires
        for (ServiceDefinition serviceDefinition : componentType.getServices().values()) {
            Class<?> interfaze = serviceDefinition.getServiceContract().getInterfaceClass();
            String name = serviceDefinition.getName();
            SystemInboundWire wire = new SystemInboundWireImpl(name, interfaze, component);
            component.addInboundWire(wire);
        }
        // handle references
        processReferences(definition, componentType.getReferences(), parent, component);
        // FIXME we need a way to build configuration references from autowires in the loader to eliminate this eval
View Full Code Here


                                 DeploymentContext deploymentContext) {
        CompositeComponent autowireComponent = parent.getParent();
        Class<?> interfaze = boundReferenceDefinition.getServiceContract().getInterfaceClass();
        String name = boundReferenceDefinition.getName();
        SystemReferenceImpl reference = new SystemReferenceImpl(name, interfaze, parent);
        SystemInboundWire inboundWire = new SystemInboundWireImpl(name, interfaze);
        String refName = boundReferenceDefinition.getName();
        boolean required = boundReferenceDefinition.isRequired();
        SystemOutboundWire outboundWire = new SystemOutboundAutowire(refName, interfaze, autowireComponent, required);
        reference.setInboundWire(inboundWire);
        reference.setOutboundWire(outboundWire);
View Full Code Here

        target.setReferenceName("ref");
        target.addTarget(new URI("foo"));
        definition.add(target);
        AtomicComponent component = builder.build(parent, definition, deploymentContext);
        OutboundWire wire = component.getOutboundWires().get("ref").get(0);
        SystemInboundWire inbound = EasyMock.createMock(SystemInboundWire.class);
        FooImpl targetFoo = new FooImpl();
        EasyMock.expect(inbound.getTargetService()).andReturn(targetFoo);
        EasyMock.replay(inbound);
        wire.setTargetWire(inbound);
        component.start();
        FooImpl foo = (FooImpl) component.getServiceInstance();
        assertNotNull(foo.ref);
View Full Code Here

TOP

Related Classes of org.apache.tuscany.core.implementation.system.wire.SystemInboundWire

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.