Package org.apache.tuscany.spi.model

Examples of org.apache.tuscany.spi.model.ReferenceTarget


            InvalidReferenceException le = new InvalidReferenceException();
            le.setIdentifier(target);
            throw le;
        }

        ReferenceTarget referenceTarget = new ReferenceTarget();
        referenceTarget.setReferenceName(name);
        try {
            referenceTarget.addTarget(new URI(target));
        } catch (URISyntaxException e) {
            InvalidReferenceException le = new InvalidReferenceException(e);
            le.setIdentifier(target);
            throw le;
        }
View Full Code Here


        impl.setImplementationClass(SourceImpl.class);
        ComponentDefinition<SystemImplementation> sourceComponentDefinition =
            new ComponentDefinition<SystemImplementation>(impl);
        sourceComponentDefinition.setName("source");

        ReferenceTarget referenceTarget = new ReferenceTarget();
        referenceTarget.setReferenceName("target");
        try {
            referenceTarget.addTarget(new URI("target/Target"));
        } catch (URISyntaxException e) {
            throw new AssertionError(e);
        }
        sourceComponentDefinition.add(referenceTarget);
        return sourceComponentDefinition;
View Full Code Here

        impl.setImplementationClass(SourceImpl.class);
        ComponentDefinition<SystemImplementation> sourceComponentDefinition =
            new ComponentDefinition<SystemImplementation>(impl);
        sourceComponentDefinition.setName("source");

        ReferenceTarget referenceTarget = new ReferenceTarget();
        referenceTarget.setReferenceName("target");
        sourceComponentDefinition.add(referenceTarget);
        return sourceComponentDefinition;
    }
View Full Code Here

        CompositeImplementation innerImpl = new CompositeImplementation();
        innerImpl.setComponentType(innerType);

        ComponentDefinition<CompositeImplementation> sourceComponentDefinition =
            new ComponentDefinition<CompositeImplementation>("SourceComponent", innerImpl);
        ReferenceTarget refTarget = new ReferenceTarget();
        refTarget.setReferenceName("TargetComponentRef");
        refTarget.addTarget(new URI("TargetComponent"));
        sourceComponentDefinition.add(refTarget);

        return sourceComponentDefinition;
    }
View Full Code Here

        JavaImplementation sourceImpl = new JavaImplementation();
        sourceImpl.setComponentType(sourceType);
        sourceImpl.setImplementationClass(SourceImpl.class);
        ComponentDefinition<JavaImplementation> innerSourceComponentDefinition =
            new ComponentDefinition<JavaImplementation>("InnerSourceComponent", sourceImpl);
        ReferenceTarget refTarget = new ReferenceTarget();
        refTarget.setReferenceName("targetReference");
        refTarget.addTarget(new URI("TargetComponentRef"));
        innerSourceComponentDefinition.add(refTarget);

        return innerSourceComponentDefinition;
    }
View Full Code Here

        ServiceContract<?> contract = registry.introspect(Foo.class);
        contract.setCallbackClass(FooCallback.class);
        contract.setCallbackName("callback");
        JavaMappedReference mappedReference = new JavaMappedReference("foo", contract, method);
        type.getReferences().put("foo", mappedReference);
        ReferenceTarget refTarget = new ReferenceTarget();
        refTarget.setReferenceName("foo");
        refTarget.getTargets().add(new URI("foo"));
        JavaImplementation impl = new JavaImplementation();
        impl.setComponentType(type);
        impl.setImplementationClass(FooClient.class);
        ComponentDefinition<JavaImplementation> def = new ComponentDefinition<JavaImplementation>(name, impl);
        def.getReferenceTargets().put("foo", refTarget);
View Full Code Here

        type.setConstructorDefinition(ctorDef);
        SystemImplementation impl = new SystemImplementation();
        impl.setComponentType(type);
        impl.setImplementationClass(FooImpl.class);
        ComponentDefinition<SystemImplementation> definition = new ComponentDefinition<SystemImplementation>(impl);
        ReferenceTarget target = new ReferenceTarget();
        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();
View Full Code Here

TOP

Related Classes of org.apache.tuscany.spi.model.ReferenceTarget

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.