Package org.switchyard.admin

Examples of org.switchyard.admin.Application


     *
     * @param application application to add
     * @return reference to this admin object
     */
    public BaseSwitchYard addApplication(Application application) {
        Application existing = _applications.putIfAbsent(application.getName(), application);
        if (existing == null) {
            _services.addAll(application.getServices());
            _references.addAll(application.getReferences());
        }
        return this;
View Full Code Here


     *
     * @param name name of the application to remove.
     * @return reference to this admin object
     */
    public BaseSwitchYard removeApplication(QName name) {
        Application application = _applications.remove(name);
        if (application != null) {
            _references.removeAll(application.getReferences());
            _services.removeAll(application.getServices());
        }
        return this;
    }
View Full Code Here

    }

    void applicationUndeployed(ApplicationUndeployedEvent event) {
        AbstractDeployment deployment = event.getDeployment();
        if (deployment.getName() != null) {
            Application app = _switchYard.getApplication(deployment.getName());
            if (app != null) {
                MBeans.unregisterApplication(app);
                _switchYard.removeApplication(deployment.getName());
            }
        }
View Full Code Here

        Assert.assertTrue(sink.lastEvent instanceof DummyEvent);
    }
   
    @Test
    public void testApplicationMBeans() {
        Application app = createApplication();
        MBeans.registerApplication(app);
        Assert.assertTrue(_mbs.isRegistered(MBeans.getObjectName(app)));
        MBeans.unregisterApplication(app);
        Assert.assertFalse(_mbs.isRegistered(MBeans.getObjectName(app)));
    }
View Full Code Here

        Assert.assertFalse(_mbs.isRegistered(MBeans.getObjectName(app)));
    }
   
    @Test
    public void testServiceMBeans() {
        Application app = createApplication();
        MBeans.registerApplication(app);
        Assert.assertTrue(_mbs.isRegistered(MBeans.getObjectName(app.getServices().get(0))));
        MBeans.unregisterApplication(app);
        Assert.assertFalse(_mbs.isRegistered(MBeans.getObjectName(app.getServices().get(0))));
    }
View Full Code Here

        Assert.assertFalse(_mbs.isRegistered(MBeans.getObjectName(app.getServices().get(0))));
    }
   
    @Test
    public void testReferenceMBeans() {
        Application app = createApplication();
        MBeans.registerApplication(app);
        Assert.assertTrue(_mbs.isRegistered(MBeans.getObjectName(app.getReferences().get(0))));
        MBeans.unregisterApplication(app);
        Assert.assertFalse(_mbs.isRegistered(MBeans.getObjectName(app.getReferences().get(0))));
    }
View Full Code Here

        Assert.assertFalse(_mbs.isRegistered(MBeans.getObjectName(app.getReferences().get(0))));
    }
   
    @Test
    public void testTransformerMBeans() {
        Application app = createApplication();
        MBeans.registerApplication(app);
        Assert.assertTrue(_mbs.isRegistered(MBeans.getObjectName(app.getTransformers().get(0))));
        MBeans.unregisterApplication(app);
        Assert.assertFalse(_mbs.isRegistered(MBeans.getObjectName(app.getTransformers().get(0))));
    }
View Full Code Here

        Assert.assertFalse(_mbs.isRegistered(MBeans.getObjectName(app.getTransformers().get(0))));
    }
   
    @Test
    public void testValidatorMBeans() {
        Application app = createApplication();
        MBeans.registerApplication(app);
        Assert.assertTrue(_mbs.isRegistered(MBeans.getObjectName(app.getValidators().get(0))));
        MBeans.unregisterApplication(app);
        Assert.assertFalse(_mbs.isRegistered(MBeans.getObjectName(app.getValidators().get(0))));
    }
View Full Code Here

        Assert.assertFalse(_mbs.isRegistered(MBeans.getObjectName(app.getValidators().get(0))));
    }
   
    @Test
    public void testBindingMBeans() {
        Application app = createApplication();
        MBeans.registerApplication(app);
        Service service = app.getServices().get(0);
        Assert.assertTrue(_mbs.isRegistered(MBeans.getObjectName(service, service.getGateways().get(0))));
        MBeans.unregisterApplication(app);
        Assert.assertFalse(_mbs.isRegistered(MBeans.getObjectName(app.getValidators().get(0))));
    }
View Full Code Here

        Assert.assertFalse(_mbs.isRegistered(MBeans.getObjectName(app.getValidators().get(0))));
    }
   
    @Test
    public void testComponentServiceMBeans() {
        Application app = createApplication();
        MBeans.registerApplication(app);
        ComponentService cs = app.getComponentServices().get(0);
        Assert.assertTrue(_mbs.isRegistered(MBeans.getObjectName(cs)));
        Assert.assertTrue(_mbs.isRegistered(MBeans.getObjectName(cs, cs.getReferences().get(0))));
        MBeans.unregisterApplication(app);
        Assert.assertFalse(_mbs.isRegistered(MBeans.getObjectName(cs)));
        Assert.assertFalse(_mbs.isRegistered(MBeans.getObjectName(cs, cs.getReferences().get(0))));
View Full Code Here

TOP

Related Classes of org.switchyard.admin.Application

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.