Package org.apache.tuscany.spi.wire

Examples of org.apache.tuscany.spi.wire.OutboundWire


    public void testToModuleScope() throws Exception {

        ModuleScopeContainer scope = new ModuleScopeContainer(workContext);
        scope.start();
        scope.onEvent(new CompositeStart(this, null));
        final OutboundWire wire = getWire(scope);
        Target service = (Target) wireService.createProxy(wire);
        Target target = (Target) wireService.createProxy(wire);
        assertNotNull(service);
        service.setString("foo");
        assertEquals("foo", service.getString());
View Full Code Here


        configuration.setInstanceFactory(new PojoObjectFactory<TargetImpl>(TargetImpl.class.getConstructor()));
        configuration.addServiceInterface(Target.class);
        configuration.setParent(parent);

        JavaAtomicComponent source = new JavaAtomicComponent("source", configuration, null);
        OutboundWire outboundWire = createOutboundWire(new QualifiedName("target/Target"), Target.class);
        outboundWire.setContainer(source);
        source.addOutboundWire(outboundWire);
        JavaAtomicComponent target = new JavaAtomicComponent("target", configuration, null);
        InboundWire targetWire = MockFactory.createTargetWire("Target", Target.class);
        targetWire.setContainer(target);
        target.addInboundWire(targetWire);
View Full Code Here

        return outboundWire;
    }

    public static <T> OutboundWire createOutboundWire(QualifiedName targetName, Class<T> interfaze)
        throws InvalidServiceContractException {
        OutboundWire wire = new OutboundWireImpl();
        JavaServiceContract contract = new JavaServiceContract(interfaze);
        wire.setServiceContract(contract);
        wire.setTargetName(targetName);
        wire.addInvocationChains(createInvocationChains(interfaze));
        return wire;
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.spi.wire.OutboundWire

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.