Package org.stagemonitor.core.configuration

Examples of org.stagemonitor.core.configuration.SimpleSource


  }

  private static void reloadConfiguration() {
    List<ConfigurationSource> configurationSources = new ArrayList<ConfigurationSource>();
    configurationSources.addAll(additionalConfigurationSources);
    configurationSources.add(new SimpleSource());
    configurationSources.add(new SystemPropertyConfigurationSource());
    final String stagemonitorPropertyOverridesLocation = System.getProperty("stagemonitor.property.overrides");
    if (stagemonitorPropertyOverridesLocation != null) {
      logger.info("try loading of default property overrides: '" + stagemonitorPropertyOverridesLocation + "'");
      configurationSources.add(new PropertyFileConfigurationSource(stagemonitorPropertyOverridesLocation));
View Full Code Here


    String instanceName = corePlugin.getInstanceName() != null ? corePlugin.getInstanceName() : "host";
    return new MeasurementSession(applicationName, getHostName(), instanceName);
  }

  static ConfigurationSource getConfiguration(String[] args) {
    final SimpleSource source = new SimpleSource("Process Arguments");
    for (String arg : args) {
      if (!arg.matches("(.+)=(.+)")) {
        throw new IllegalArgumentException("Illegal argument '" + arg +
            "'. Arguments must be in form '<config-key>=<config-value>'");
      }
      final String[] split = arg.split("=");
      source.add(split[0], split[1]);
    }
    return source;
  }
View Full Code Here

TOP

Related Classes of org.stagemonitor.core.configuration.SimpleSource

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.