Examples of stop()


Examples of org.apache.tuscany.core.implementation.composite.CompositeComponentImpl.stop()

        assertNotNull(source);
        Target target = (Target) parent.getSystemChild("target").getServiceInstance();
        assertNotNull(target);
        assertSame(target, source.getTarget());
        scope.onEvent(new CompositeStop(this, parent));
        parent.stop();
        scope.stop();
    }

    /**
     * Validates building a wire from an atomic context to a reference context
View Full Code Here

Examples of org.apache.tuscany.core.implementation.system.component.SystemAtomicComponentImpl.stop()

        Object instance = context.getServiceInstance();
        assertSame(instance, context.getServiceInstance());

        scope.onEvent(new RequestEnd(this));
        scope.stop();
        context.stop();

        scope.start();
        context.start();
        assertNotSame(instance, context.getServiceInstance());
        scope.onEvent(new RequestEnd(this));
View Full Code Here

Examples of org.apache.tuscany.core.runtime.RuntimeContext.stop()

        HelloWorldService service1 = (HelloWorldService) child.getContext("target").getInstance(null);
        Assert.assertEquals("foo", service1.hello("foo"));

        child.publish(new RequestEnd(this, id));
        child.publish(new ModuleStop(this));
        runtime.stop();

    }

    protected void setUp() throws Exception {
        super.setUp();
View Full Code Here

Examples of org.apache.tuscany.core.runtime.RuntimeContextImpl.stop()

        source.getGenericComponent().getString();
        Assert.assertEquals(1, mockInterceptor.getCount());
        source.getGenericComponent().getString();
        Assert.assertEquals(2, mockInterceptor.getCount());
        child.publish(new ModuleStop(this));
        runtime.stop();
    }

    public void testRefWithSourceInterceptorHandler() throws Exception {
        MockSyncInterceptor mockInterceptor = new MockSyncInterceptor();
        MockInterceptorBuilder interceptorBuilder = new MockInterceptorBuilder(mockInterceptor, true);
View Full Code Here

Examples of org.apache.tuscany.sca.Node.stop()

        String ci = node.getStartedCompositeURIs("helloworld").get(0);

        Helloworld helloworldService = node.getService(Helloworld.class, "HelloworldComponent");
        Assert.assertEquals("Hello petra", helloworldService.sayHello("petra"));

        node.stop("helloworld", ci);
        try {
            node.getService(Helloworld.class, "HelloworldComponent");
            Assert.fail();
        } catch (NoSuchServiceException e) {
            // expected as there is no deployables
View Full Code Here

Examples of org.apache.tuscany.sca.TuscanyRuntime.stop()

        Helloworld helloworldService = node.getService(Helloworld.class, "HelloworldComponent");
        Assert.assertEquals("Hello petra", helloworldService.sayHello("petra"));
        } finally {
            node.stop();
        }
        runtime.stop();
    }
}
View Full Code Here

Examples of org.apache.tuscany.sca.core.ModuleActivator.stop()

                }
                reg.unregister();
            }
        }
        for (ModuleActivator activator : map.values()) {
            activator.stop(this);
        }
        services.clear();
    }

}
View Full Code Here

Examples of org.apache.tuscany.sca.core.assembly.CompositeActivator.stop()

        // Stop and deactivate composites
        CompositeActivator compositeActivator = runtime.getCompositeActivator();
        for (Composite composite : domainComposite.getIncludes()) {
            try {
                for (Component component : composite.getComponents()) {
                    compositeActivator.stop(component);
                }
            } catch (ActivationException e) {
                throw new ServiceRuntimeException(e);
            }
        }
View Full Code Here

Examples of org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.stop()

                    break;
                }
            }
            if (toRemove != null) {
                CompositeActivatorImpl activator = (CompositeActivatorImpl) compositeActivator;
                activator.stop(source, toRemove);
                activator.deactivate(source,
                        (RuntimeComponentReference) toRemove);
                compositeBuilder.detachWire(composite, source, toRemove);
            } else {
                throw new ComponentNotFoundException("Not found component "
View Full Code Here

Examples of org.apache.tuscany.sca.core.context.InstanceWrapper.stop()

                callbackConversations.remove(contextId);
            }

            // stop the component if this removes the last reference
            if (clientConversationId == null && callbackConversations.isEmpty()) {
                ctx.stop();
            }
        }

        private void createInstance(Object contextId) throws TargetResolutionException {
            InstanceWrapper instanceWrapper = createInstanceWrapper();
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.