Examples of registerModelObject()


Examples of org.apache.tuscany.core.context.SystemCompositeContext.registerModelObject()

        Component comp = systemFactory.createSystemComponent(POLICY_BUILDER_REGISTRY, PolicyBuilderRegistry.class, DefaultPolicyBuilderRegistry.class, Scope.MODULE);
        comp.getImplementation().setComponentType(getIntrospector().introspect(DefaultPolicyBuilderRegistry.class));
        ctx.registerModelObject(comp);
        comp = systemFactory.createSystemComponent(MESSAGE_FACTORY, MessageFactory.class, MessageFactoryImpl.class, Scope.MODULE);
        comp.getImplementation().setComponentType(getIntrospector().introspect(MessageFactoryImpl.class));
        ctx.registerModelObject(comp);
        comp = systemFactory.createSystemComponent(PROXY_FACTORY_FACTORY, WireFactoryFactory.class, JDKWireFactoryFactory.class, Scope.MODULE);
        comp.getImplementation().setComponentType(getIntrospector().introspect(JDKWireFactoryFactory.class));
        ctx.registerModelObject(comp);
        comp = systemFactory.createSystemComponent(WIRE_FACTORY_SERVICE, org.apache.tuscany.core.wire.service.WireFactoryService.class, DefaultWireFactoryService.class, Scope.MODULE);
        comp.getImplementation().setComponentType(getIntrospector().introspect(DefaultWireFactoryService.class));
View Full Code Here

Examples of org.apache.tuscany.core.context.SystemCompositeContext.registerModelObject()

        comp = systemFactory.createSystemComponent(MESSAGE_FACTORY, MessageFactory.class, MessageFactoryImpl.class, Scope.MODULE);
        comp.getImplementation().setComponentType(getIntrospector().introspect(MessageFactoryImpl.class));
        ctx.registerModelObject(comp);
        comp = systemFactory.createSystemComponent(PROXY_FACTORY_FACTORY, WireFactoryFactory.class, JDKWireFactoryFactory.class, Scope.MODULE);
        comp.getImplementation().setComponentType(getIntrospector().introspect(JDKWireFactoryFactory.class));
        ctx.registerModelObject(comp);
        comp = systemFactory.createSystemComponent(WIRE_FACTORY_SERVICE, org.apache.tuscany.core.wire.service.WireFactoryService.class, DefaultWireFactoryService.class, Scope.MODULE);
        comp.getImplementation().setComponentType(getIntrospector().introspect(DefaultWireFactoryService.class));
        ctx.registerModelObject(comp);
        comp = systemFactory.createSystemComponent(JAVA_BUILDER, ContextFactoryBuilder.class, JavaContextFactoryBuilder.class, Scope.MODULE);
        comp.getImplementation().setComponentType(getIntrospector().introspect(JavaContextFactoryBuilder.class));
View Full Code Here

Examples of org.apache.tuscany.core.context.SystemCompositeContext.registerModelObject()

        comp = systemFactory.createSystemComponent(PROXY_FACTORY_FACTORY, WireFactoryFactory.class, JDKWireFactoryFactory.class, Scope.MODULE);
        comp.getImplementation().setComponentType(getIntrospector().introspect(JDKWireFactoryFactory.class));
        ctx.registerModelObject(comp);
        comp = systemFactory.createSystemComponent(WIRE_FACTORY_SERVICE, org.apache.tuscany.core.wire.service.WireFactoryService.class, DefaultWireFactoryService.class, Scope.MODULE);
        comp.getImplementation().setComponentType(getIntrospector().introspect(DefaultWireFactoryService.class));
        ctx.registerModelObject(comp);
        comp = systemFactory.createSystemComponent(JAVA_BUILDER, ContextFactoryBuilder.class, JavaContextFactoryBuilder.class, Scope.MODULE);
        comp.getImplementation().setComponentType(getIntrospector().introspect(JavaContextFactoryBuilder.class));
        ctx.registerModelObject(comp);
        comp = systemFactory.createSystemComponent(JAVA_WIRE_BUILDER, WireBuilder.class, JavaTargetWireBuilder.class, Scope.MODULE);
        comp.getImplementation().setComponentType(getIntrospector().introspect(JavaTargetWireBuilder.class));
View Full Code Here

Examples of org.apache.tuscany.core.context.SystemCompositeContext.registerModelObject()

        comp = systemFactory.createSystemComponent(WIRE_FACTORY_SERVICE, org.apache.tuscany.core.wire.service.WireFactoryService.class, DefaultWireFactoryService.class, Scope.MODULE);
        comp.getImplementation().setComponentType(getIntrospector().introspect(DefaultWireFactoryService.class));
        ctx.registerModelObject(comp);
        comp = systemFactory.createSystemComponent(JAVA_BUILDER, ContextFactoryBuilder.class, JavaContextFactoryBuilder.class, Scope.MODULE);
        comp.getImplementation().setComponentType(getIntrospector().introspect(JavaContextFactoryBuilder.class));
        ctx.registerModelObject(comp);
        comp = systemFactory.createSystemComponent(JAVA_WIRE_BUILDER, WireBuilder.class, JavaTargetWireBuilder.class, Scope.MODULE);
        comp.getImplementation().setComponentType(getIntrospector().introspect(JavaTargetWireBuilder.class));
        ctx.registerModelObject(comp);
        ctx.publish(new ModuleStart(new Object()));
        return runtime;
View Full Code Here

Examples of org.apache.tuscany.core.context.SystemCompositeContext.registerModelObject()

        comp = systemFactory.createSystemComponent(JAVA_BUILDER, ContextFactoryBuilder.class, JavaContextFactoryBuilder.class, Scope.MODULE);
        comp.getImplementation().setComponentType(getIntrospector().introspect(JavaContextFactoryBuilder.class));
        ctx.registerModelObject(comp);
        comp = systemFactory.createSystemComponent(JAVA_WIRE_BUILDER, WireBuilder.class, JavaTargetWireBuilder.class, Scope.MODULE);
        comp.getImplementation().setComponentType(getIntrospector().introspect(JavaTargetWireBuilder.class));
        ctx.registerModelObject(comp);
        ctx.publish(new ModuleStart(new Object()));
        return runtime;
    }

    /**
 
View Full Code Here

Examples of org.apache.tuscany.core.context.SystemCompositeContext.registerModelObject()

public class IntraCompositeWireTestCase extends TestCase {

    public void testModuleToModuleScope() throws Exception {
        SystemCompositeContext context = createContext();
        context.start();
        context.registerModelObject(MockFactory.createSystemModuleWithWiredComponents("system.module",Scope.MODULE, Scope.MODULE));
        context.publish(new ModuleStart(this));
        Source source = (Source) ((AtomicContext) context.getContext("source")).getTargetInstance();
        Assert.assertNotNull(source);
        Target targetRef = source.getTarget();
        Assert.assertNotNull(targetRef);
View Full Code Here

Examples of org.apache.tuscany.core.context.SystemCompositeContext.registerModelObject()

    }

    public void testStatelessToModuleScope() throws Exception {
        SystemCompositeContext context = createContext();
        context.start();
        context.registerModelObject(MockFactory.createSystemModuleWithWiredComponents("system.module",Scope.INSTANCE, Scope.MODULE));
        context.publish(new ModuleStart(this));
        Source source = (Source) ((AtomicContext) context.getContext("source")).getTargetInstance();
        Assert.assertNotNull(source);
        Target targetRef = source.getTarget();
        Assert.assertNotNull(targetRef);
View Full Code Here

Examples of org.apache.tuscany.core.context.SystemCompositeContext.registerModelObject()

    }

    public void testModuleToStatelessScope() throws Exception {
        SystemCompositeContext context = createContext();
        context.start();
        context.registerModelObject(MockFactory.createSystemModuleWithWiredComponents("system.module",Scope.MODULE, Scope.INSTANCE));
        context.publish(new ModuleStart(this));
        Source source = (Source) ((AtomicContext) context.getContext("source")).getTargetInstance();
        Assert.assertNotNull(source);
        Target targetRef = source.getTarget();
        Assert.assertNotNull(targetRef);
View Full Code Here

Examples of org.apache.tuscany.core.context.SystemCompositeContext.registerModelObject()

    }

    public void testMultiplicity() throws Exception {
        SystemCompositeContext context = createContext();
        context.start();
        context.registerModelObject(MockFactory.createSystemModuleWithWiredComponents("system.module",Scope.MODULE, Scope.MODULE));
        context.publish(new ModuleStart(this));
        Source source = (Source) ((AtomicContext) context.getContext("source")).getTargetInstance();
        Assert.assertNotNull(source);
        Target target = (Target) ((AtomicContext) context.getContext("target")).getTargetInstance();
        Assert.assertNotNull(target);
View Full Code Here

Examples of org.apache.tuscany.core.context.SystemCompositeContext.registerModelObject()

        Component target = MockFactory.createSystemComponent("target", Target.class, TargetImpl.class, Scope.MODULE);
        system1Component.getImplementation().getComponents().add(target);

        EntryPoint ep = MockFactory.createEPSystemBinding("target.ep", Target.class, "target", target);
        system1Component.getImplementation().getEntryPoints().add(ep);
        system.registerModelObject(system1Component);
        EntryPoint systemEp = MockFactory.createEPSystemBinding("target.system.ep", Target.class, "ref");

        systemEp.getBindings().add(systemFactory.createSystemBinding());
        Service service = systemFactory.createService();
        service.setName("system1/target.ep");
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.