Package org.switchyard.admin

Examples of org.switchyard.admin.ComponentService


    @Override
    public ObjectName getComponentService(String componentServiceName) {
        ObjectName name = null;
        if (componentServiceName != null) {
            ComponentService service = _application.getComponentService(QName.valueOf(componentServiceName));
            if (service != null) {
                name = MBeans.getObjectName(service);
            }
        }
        return name;
View Full Code Here


   
    @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

        when(app.getValidators()).thenReturn(validators);
       
        // Components
        List<ComponentService> compSvcs = new ArrayList<ComponentService>();
        List<ComponentReference> compRefs = new ArrayList<ComponentReference>();
        ComponentService compSvc = mock(ComponentService.class);
        ComponentReference compRef = mock(ComponentReference.class);
        when(compSvc.getName()).thenReturn(TEST_COMPONENT_SERVICE);
        when(compRef.getName()).thenReturn(TEST_COMPONENT_REFERENCE);
        compSvcs.add(compSvc);
        compRefs.add(compRef);
        when(app.getComponentServices()).thenReturn(compSvcs);
        when(compSvc.getReferences()).thenReturn(compRefs);
       
        return app;
    }
View Full Code Here

        _builder.notify(new ExchangeCompletionEvent(ex));

        assertEquals(1, _switchYard.getMessageMetrics().getSuccessCount());
        assertEquals(10.0, _switchYard.getMessageMetrics().getAverageProcessingTime(), 0);
        ComponentService componentService = _switchYard.getApplication(TEST_APP).getComponentService(TEST_PROMOTED_SERVICE);
        assertEquals(10.0, componentService.getMessageMetrics().getAverageProcessingTime(), 0);
        assertEquals(10.0, componentService.getServiceOperation(OPERATION_NAME).getMessageMetrics().getAverageProcessingTime(), 0);
        assertEquals(10.0, _switchYard.getApplication(TEST_APP).getService(TEST_SERVICE).getGateway(TEST_GATEWAY).getMessageMetrics().getAverageProcessingTime(), 0);
    }
View Full Code Here

TOP

Related Classes of org.switchyard.admin.ComponentService

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.