Examples of ModuleStop


Examples of org.apache.tuscany.core.context.event.ModuleStop

            moduleContext.locateService("TestServiceEP");
            fail("Expected " + ServiceNotFoundException.class.getName());
        } catch (ServiceNotFoundException e) {
            // expected
        }
        moduleContext.publish(new ModuleStop(this));
    }
View Full Code Here

Examples of org.apache.tuscany.core.context.event.ModuleStop

        system.publish(new ModuleStart(this));
        Component module1 = MockFactory.createCompositeComponent("module1");
        runtime.registerModelObject(module1);
        runtime.getContext("module1");
        Assert.assertTrue(((TestBuilder) system.getContext("TestBuilder").getInstance(null)).invoked());
        system.publish(new ModuleStop(this));
    }
View Full Code Here

Examples of org.apache.tuscany.core.context.event.ModuleStop

        ExternalService es = MockFactory.createESSystemBinding("TestService2ES", "tuscany.system/TestService2EP");
        moduleContext.registerModelObject(es);
        moduleContext.publish(new ModuleStart(this));
        Assert.assertNotNull(moduleContext.getContext("TestService2ES").getInstance(null));

        moduleContext.publish(new ModuleStop(this));
        system.publish(new ModuleStop(this));
        runtime.stop();
    }
View Full Code Here

Examples of org.apache.tuscany.core.context.event.ModuleStop

        response = handler.invoke(null, hello, new Object[]{"foo"});
        Assert.assertEquals("foo", response);
        Assert.assertEquals(3, mockInterceptor.getCount());
        child.publish(new RequestEnd(this, id2));

        child.publish(new ModuleStop(this));
        runtime.stop();

    }
View Full Code Here

Examples of org.apache.tuscany.core.context.event.ModuleStop

        moduleContext.publish(new ModuleStart(this));
        GenericSystemComponent component = (GenericSystemComponent) moduleContext.getContext("TestService1").getInstance(null);
        Assert.assertNotNull(component);
        GenericSystemComponent ep = (GenericSystemComponent) moduleContext.getContext("TestService1EP").getInstance(null);
        Assert.assertNotNull(ep);
        moduleContext.publish(new ModuleStop(this));
        moduleContext.stop();
    }
View Full Code Here

Examples of org.apache.tuscany.core.context.event.ModuleStop

        moduleContext.publish(new ModuleStart(this));
        GenericSystemComponent component = (GenericSystemComponent) moduleContext.getContext("TestService1").getInstance(null);
        Assert.assertNotNull(component);
        GenericSystemComponent ep = (GenericSystemComponent) moduleContext.getContext("TestService1EP").getInstance(null);
        Assert.assertNotNull(ep);
        moduleContext.publish(new ModuleStop(this));
        moduleContext.stop();
    }
View Full Code Here

Examples of org.apache.tuscany.core.context.event.ModuleStop

        moduleContext.publish(new ModuleStart(this));
        GenericSystemComponent test = (GenericSystemComponent) moduleContext.getContext("TestService1").getInstance(null);
        Assert.assertNotNull(test);
        GenericSystemComponent testEP = (GenericSystemComponent) moduleContext.getContext("TestService1EP").getInstance(null);
        Assert.assertNotNull(testEP);
        moduleContext.publish(new ModuleStop(this));
        moduleContext.stop();
    }
View Full Code Here

Examples of org.apache.tuscany.core.context.event.ModuleStop

        moduleContext.publish(new ModuleStart(this));
        GenericSystemComponent test = (GenericSystemComponent) moduleContext.getContext("TestService1").getInstance(null);
        Assert.assertNotNull(test);
        GenericSystemComponent testEP = (GenericSystemComponent) moduleContext.getContext("TestService1EP").getInstance(null);
        Assert.assertNotNull(testEP);
        moduleContext.publish(new ModuleStop(this));
        moduleContext.stop();
    }
View Full Code Here

Examples of org.apache.tuscany.core.context.event.ModuleStop

        scope.onEvent(new ModuleStart(this));
        OrderedDependentPojo source = (OrderedDependentPojo) scope.getContext("source").getInstance(null);
        assertNotNull(source.getPojo());
        // expire module
        assertEquals(2,source.getNumberInstantiated());
        scope.onEvent(new ModuleStop(this));
        assertEquals(0,source.getNumberInstantiated());
        scope.stop();
    }
View Full Code Here

Examples of org.apache.tuscany.core.context.event.ModuleStop

        CompositeScopeContext scopeContainer = new CompositeScopeContext(ctx);
        scopeContainer.registerFactory(MockFactory.createCompositeConfiguration("CompositeComponent"));
        scopeContainer.start();
        scopeContainer.onEvent(new ModuleStart(this));
        scopeContainer.getContext("CompositeComponent");
        scopeContainer.onEvent(new ModuleStop(this));
        scopeContainer.stop();
    }
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.