Package org.apache.servicemix.jbi.deployer

Examples of org.apache.servicemix.jbi.deployer.ServiceAssembly


        Set<String> sas = deployer.getServiceAssemblies().keySet();
        return sas.toArray(new String[sas.size()]);
    }

    public String getServiceAssemblyDescriptor(String saName) throws Exception {
        ServiceAssembly sa = deployer.getServiceAssembly(saName);
        return sa != null ? sa.getDescriptor() : null;
    }
View Full Code Here


                && component.getComponent().getServiceUnitManager() != null;
    }

    public String start(String serviceAssemblyName) throws Exception {
        try {
            ServiceAssembly sa = deployer.getServiceAssembly(serviceAssemblyName);
            if (sa == null) {
                throw ManagementSupport.failure("start", "SA does not exist: " + serviceAssemblyName);
            }
            sa.start();
            return ManagementSupport.createSuccessMessage("start service assembly successfully", serviceAssemblyName);
        } catch (Exception e) {
            LOG.info("Error in start", e);
            throw e;
        }
View Full Code Here

        }
    }

    public String stop(String serviceAssemblyName) throws Exception {
        try {
            ServiceAssembly sa = deployer.getServiceAssembly(serviceAssemblyName);
            if (sa == null) {
                throw ManagementSupport.failure("stop", "SA does not exist: " + serviceAssemblyName);
            }
            sa.stop();
            return ManagementSupport.createSuccessMessage("stop service assembly successfully", serviceAssemblyName);
        } catch (Exception e) {
            LOG.info("Error in stop", e);
            throw e;
        }
View Full Code Here

        }
    }

    public String shutDown(String serviceAssemblyName) throws Exception {
        try {
            ServiceAssembly sa = deployer.getServiceAssembly(serviceAssemblyName);
            if (sa == null) {
                throw ManagementSupport.failure("shutdown", "SA does not exist: " + serviceAssemblyName);
            }
            sa.shutDown();
            return ManagementSupport.createSuccessMessage("shutdown service assembly successfully", serviceAssemblyName);
        } catch (Exception e) {
            LOG.info("Error in shutdown", e);
            throw e;
        }
View Full Code Here

        }
    }

    public String getState(String serviceAssemblyName) throws Exception {
        try {
            ServiceAssembly sa = deployer.getServiceAssembly(serviceAssemblyName);
            if (sa == null) {
                throw ManagementSupport.failure("getState", "SA does not exist: " + serviceAssemblyName);
            }
            return sa.getCurrentState();
        } catch (Exception e) {
            LOG.info("Error in getState", e);
            throw e;
        }
    }
View Full Code Here

    public String[] getComponentsForDeployedServiceAssembly(String saName) {
        String[] result;
        // iterate through the service assembilies
        Set<String> tmpList = new HashSet<String>();
        ServiceAssembly sa = deployer.getServiceAssembly(saName);
        if (sa != null) {
            for (ServiceUnit su : sa.getServiceUnits()) {
                if (su.getComponent().getName().equals(saName)) {
                    tmpList.add(su.getComponent().getName());
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.servicemix.jbi.deployer.ServiceAssembly

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.