Package org.switchyard.admin

Examples of org.switchyard.admin.Service


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


   
    @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

        Application app = mock(BaseApplication.class);
        when(app.getName()).thenReturn(TEST_APP);
       
        // Services
        List<Service> services = new ArrayList<Service>();
        Service service = mock(BaseService.class);
        when (service.getName()).thenReturn(TEST_COMPOSITE_SERVICE);
        services.add(service);
        when(app.getServices()).thenReturn(services);
       
        // References
        List<Reference> references = new ArrayList<Reference>();
        Reference ref = mock(Reference.class);
        when(ref.getName()).thenReturn(TEST_COMPOSITE_REFERENCE);
        references.add(ref);
        when(app.getReferences()).thenReturn(references);
       
        // Bindings
        Binding bind = mock(Binding.class);
        List<Binding> bindings = new ArrayList<Binding>();
        bindings.add(bind);
        when(bind.getName()).thenReturn("xyz");
        when(service.getGateways()).thenReturn(bindings);
       
        // Transformers
        List<Transformer> transformers = new ArrayList<Transformer>();
        Transformer t = mock(Transformer.class);
        transformers.add(t);
View Full Code Here

TOP

Related Classes of org.switchyard.admin.Service

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.