Package org.mule.registry

Examples of org.mule.registry.Assembly


      File installDir = Directories.getAssemblyInstallDir(this.container.getWorkingDir(), name);
      if (!unzip.renameTo(installDir)) {
        throw new IOException("Could not rename directory: " + unzip);
      }
      // Create assembly
      Assembly assembly = this.registry.addAssembly(name);
      assembly.setDescriptor(new JbiDescriptor(jbi));
      assembly.setInstallRoot(installDir.getAbsolutePath());
      String result = assembly.deploy();
      return result;
    } catch (Exception e) {
      LOGGER.error("Could not install shared library", e);
      throw new RuntimeException("Could not install shared library", e);
    } finally {
View Full Code Here


      IOUtils.deleteFile(dir);
    }
  }

  public String undeploy(String saName) throws Exception {
    Assembly assembly = this.registry.getAssembly(saName);
    if (assembly == null) {
      throw new JBIException("Assembly not deployed: " + saName);
    }
    return assembly.undeploy();
  }
View Full Code Here

    }
    return names;
  }

  public String getServiceAssemblyDescriptor(String saName) throws Exception {
    Assembly assembly = this.registry.getAssembly(saName);
    if (assembly == null) {
      throw new JBIException("Assembly not deployed: " + saName);
    }
    return ((Jbi)assembly.getDescriptor().getConfiguration()).xmlText();
  }
View Full Code Here

    return null;
  }

  public String[] getComponentsForDeployedServiceAssembly(String saName)
      throws Exception {
    Assembly assembly = this.registry.getAssembly(saName);
    if (assembly == null) {
      throw new JBIException("Assembly not deployed: " + saName);
    }
    Unit[] units = assembly.getUnits();
    Set names = new HashSet();
    for (int i = 0; i < units.length; i++) {
      names.add(units[i].getRegistryComponent().getName());
    }
    return (String[]) names.toArray(new String[names.size()]);
View Full Code Here

    }
    return false;
  }

  public String start(String serviceAssemblyName) throws Exception {
    Assembly assembly = this.registry.getAssembly(serviceAssemblyName);
    if (assembly == null) {
      throw new JBIException("Assembly not deployed: " + serviceAssemblyName);
    }
    return assembly.start();
  }
View Full Code Here

    }
    return assembly.start();
  }

  public String stop(String serviceAssemblyName) throws Exception {
    Assembly assembly = this.registry.getAssembly(serviceAssemblyName);
    if (assembly == null) {
      throw new JBIException("Assembly not deployed: " + serviceAssemblyName);
    }
    return assembly.stop();
  }
View Full Code Here

    }
    return assembly.stop();
  }

  public String shutDown(String serviceAssemblyName) throws Exception {
    Assembly assembly = this.registry.getAssembly(serviceAssemblyName);
    if (assembly == null) {
      throw new JBIException("Assembly not deployed: " + serviceAssemblyName);
    }
    return assembly.shutDown();
  }
View Full Code Here

    }
    return assembly.shutDown();
  }

  public String getState(String serviceAssemblyName) throws Exception {
    Assembly assembly = this.registry.getAssembly(serviceAssemblyName);
    if (assembly == null) {
      throw new JBIException("Assembly not deployed: " + serviceAssemblyName);
    }
    return assembly.getCurrentState();
  }
View Full Code Here

        RegistryComponent component = new JbiRegistryComponent(name, type, this);
        return component;
    }

    public Assembly createAssembly(String name) {
        Assembly assembly = new JbiAssembly(this);
        assembly.setName(name);
        return assembly;
    }
View Full Code Here

TOP

Related Classes of org.mule.registry.Assembly

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.