Package org.fusesource.ide.server.karaf.core.server

Examples of org.fusesource.ide.server.karaf.core.server.BaseConfigPropertyProvider


   * @param server
   * @return
   */
  public static String getJMXConnectionURL(IServer server) {
    String retVal = "";
    BaseConfigPropertyProvider manProv = new BaseConfigPropertyProvider(server.getRuntime().getLocation().append("etc").append("org.apache.karaf.management.cfg").toFile());
    BaseConfigPropertyProvider sysProv = new BaseConfigPropertyProvider(server.getRuntime().getLocation().append("etc").append("system.properties").toFile());
   
    String url = manProv.getConfigurationProperty("serviceUrl");
    if (url == null) return null;
    url = url.trim();
    int pos = -1;
    while ((pos = url.indexOf("${")) != -1) {
      retVal += url.substring(0, pos);
      String placeHolder = url.substring(url.indexOf("${")+2, url.indexOf("}")).trim();
      String replacement = manProv.getConfigurationProperty(placeHolder);
      if (replacement == null) {
        replacement = sysProv.getConfigurationProperty(placeHolder);
      }
      if (replacement == null) {
        return null;
      } else {
        retVal += replacement.trim();
View Full Code Here


    }
    return defaultValue;
  }

  protected int findManagementPort(int defaultValue) {
    BaseConfigPropertyProvider provider = new BaseConfigPropertyProvider(
        getServerConfigPropertyFile());
    String sPort = provider
        .getConfigurationProperty(SHUTDOWN_PORT_PROPERTY);
    String sPortFile = provider
        .getConfigurationProperty(SHUTDOWN_PORT_FILE_PROPERTY);
    if (sPort == null) {
      sPortFile = substitutePlaceHolders(sPortFile);
      sPort = readKarafShutdownPortFromFile(sPortFile);
    }
View Full Code Here

    }
    return value;
  }

  protected String getShutdownCommand() {
    BaseConfigPropertyProvider provider = new BaseConfigPropertyProvider(
        getServerConfigPropertyFile());
    String cmd = provider
        .getConfigurationProperty(getShutdownCommandPropertyKey());
    if (cmd == null)
      cmd = getDefaultKarafShutdownCommand();
    return cmd;
  }
View Full Code Here

TOP

Related Classes of org.fusesource.ide.server.karaf.core.server.BaseConfigPropertyProvider

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.