Examples of RuntimeContextImpl


Examples of org.apache.tuscany.core.runtime.RuntimeContextImpl

        WireFactoryService wireFactory = new DefaultWireFactoryService(new MessageFactoryImpl(), new JDKWireFactoryFactory(), policyRegistry);
        JavaContextFactoryBuilder javaBuilder = new JavaContextFactoryBuilder(wireFactory);

        builderRegistry.register(javaBuilder);

        RuntimeContext runtime = new RuntimeContextImpl(monitorFactory, builderRegistry, defaultWireBuilder);
        runtime.addBuilder(new JavaTargetWireBuilder());

        runtime.start();
        runtime.getRootContext().registerModelObject(
                MockFactory.createCompositeComponent("test.module"));
        CompositeContext child = (CompositeContext) runtime.getRootContext().getContext("test.module");
        child.registerModelObject(MockFactory.createModule());
        child.publish(new ModuleStart(this));
        GenericComponent source = (GenericComponent) child.getContext("source").getInstance(null);
        Assert.assertNotNull(source);
        source.getGenericComponent().getString();
        Assert.assertEquals(1, mockInterceptor.getCount());
        source.getGenericComponent().getString();
        Assert.assertEquals(2, mockInterceptor.getCount());
        child.publish(new ModuleStop(this));
        runtime.stop();
    }
View Full Code Here

Examples of org.apache.tuscany.core.runtime.RuntimeContextImpl

        AssemblyModelContext modelContext = BootstrapHelper.getModelContext(classLoader);

        // Create a runtime context and start it
        List<SCDLModelLoader> loaders = modelContext.getAssemblyLoader().getLoaders();
        List<ContextFactoryBuilder> configBuilders = BootstrapHelper.getBuilders();
        runtime = new RuntimeContextImpl(monitorFactory, loaders, configBuilders, new DefaultWireBuilder());
        runtime.start();
        monitor.started(runtime);

        // Load and start the system configuration
        SystemAggregateContext systemContext = runtime.getSystemContext();
View Full Code Here

Examples of org.apache.tuscany.core.runtime.RuntimeContextImpl

        AssemblyModelContext modelContext = BootstrapHelper.getModelContext(classLoader);

        // Create a runtime context and start it
        List<SCDLModelLoader> loaders = modelContext.getAssemblyLoader().getLoaders();
        List<ContextFactoryBuilder> configBuilders = BootstrapHelper.getBuilders();
        runtime = new RuntimeContextImpl(monitorFactory, loaders, configBuilders, new DefaultWireBuilder());
        runtime.start();
        monitor.started(runtime);

        // Load and start the system configuration
        SystemAggregateContext systemContext = runtime.getSystemContext();
View Full Code Here

Examples of org.crsh.shell.impl.command.RuntimeContextImpl

      String commandName = termPrefix.substring(0, pos);
      termPrefix = termPrefix.substring(pos);
      try {
        Command<?> command = session.getCommand(commandName);
        if (command != null) {
          completion = command.complete(new RuntimeContextImpl(session, session.getContext().getAttributes()), termPrefix);
        } else {
          completion = new CompletionMatch(Delimiter.EMPTY, Completion.create());
        }
      }
      catch (CommandException e) {
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.