Examples of InboundWire


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

        configuration.setInstanceFactory(new PojoObjectFactory<TargetImpl>(TargetImpl.class.getConstructor()));
        configuration.addServiceInterface(Target.class);
        configuration.setWireService(new JDKWireService());
        final JavaAtomicComponent component = new JavaAtomicComponent("target", configuration, null);

        InboundWire wire = createMock(InboundWire.class);

        JavaServiceContract contract = new JavaServiceContract(Target.class);
        EasyMock.expect(wire.getServiceContract()).andReturn(contract).anyTimes();
        expect(wire.getServiceName()).andReturn("Target");
        Map<Operation<?>, InboundInvocationChain> chains = new HashMap<Operation<?>, InboundInvocationChain>();
        expect(wire.getInvocationChains()).andReturn(chains);
        expect(wire.getCallbackReferenceName()).andReturn(null);
        replay(wire);
        component.addInboundWire(wire);
        component.prepare();
        component.start();
        assertTrue(component.getServiceInstance("Target") instanceof Target);
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.