private Integer getRequiredIntegerProperty(Properties properties, String key) { String value = getRequiredProperty(properties, key); try { return Integer.valueOf(value); } catch (NumberFormatException e) { throw new IllegalArgumentException( "Restlet Cloud configuration file error. The property '" + key + "' should be a number", e); } }
/** * Load the agent configuration from the file set by the system property * 'apiSparkServiceConfig'. * * @see #CONFIGURATION_FILE_SYSTEM_PROPERTY_KEY */ public void loadConfiguration() { String configurationFile = System .getProperty(CONFIGURATION_FILE_SYSTEM_PROPERTY_KEY); if (configurationFile == null) { throw new IllegalArgumentException( "Agent configuration file is not set. " + "Use system property '" + CONFIGURATION_FILE_SYSTEM_PROPERTY_KEY + "' to define it."); } loadConfiguration(new File(configurationFile)); }
DEFAULT_AGENT_SERVICE_URL); this.agentLogin = properties.getProperty("agent.login"); this.agentPassword = getRequiredProperty(properties, "agent.password") .toCharArray(); this.agentCellId = getRequiredIntegerProperty(properties, "agent.cellId"); this.agentCellVersion = getRequiredIntegerProperty(properties, "agent.cellVersion"); this.reverseProxyEnabled = Boolean.valueOf(getRequiredProperty( properties, "reverseProxy.enabled")); if (this.reverseProxyEnabled) { this.reverseProxyTargetUrl = getRequiredProperty(properties, "reverseProxy.targetUrl");
DEFAULT_AGENT_SERVICE_URL); this.agentLogin = properties.getProperty("agent.login"); this.agentPassword = getRequiredProperty(properties, "agent.password") .toCharArray(); this.agentCellId = getRequiredIntegerProperty(properties, "agent.cellId"); this.agentCellVersion = getRequiredIntegerProperty(properties, "agent.cellVersion"); this.reverseProxyEnabled = Boolean.valueOf(getRequiredProperty( properties, "reverseProxy.enabled")); if (this.reverseProxyEnabled) { this.reverseProxyTargetUrl = getRequiredProperty(properties, "reverseProxy.targetUrl");
DEFAULT_AGENT_SERVICE_URL); this.agentLogin = properties.getProperty("agent.login"); this.agentPassword = getRequiredProperty(properties, "agent.password") .toCharArray(); this.agentCellId = getRequiredIntegerProperty(properties, "agent.cellId"); this.agentCellVersion = getRequiredIntegerProperty(properties, "agent.cellVersion"); this.reverseProxyEnabled = Boolean.valueOf(getRequiredProperty( properties, "reverseProxy.enabled")); if (this.reverseProxyEnabled) { this.reverseProxyTargetUrl = getRequiredProperty(properties, "reverseProxy.targetUrl");
/** * Load the agent configuration from the file set by the system property * 'apiSparkServiceConfig'. * * @see #CONFIGURATION_FILE_SYSTEM_PROPERTY_KEY */ public void loadConfiguration() { String configurationFile = System .getProperty(CONFIGURATION_FILE_SYSTEM_PROPERTY_KEY); if (configurationFile == null) { throw new IllegalArgumentException( "Agent configuration file is not set. " + "Use system property '" + CONFIGURATION_FILE_SYSTEM_PROPERTY_KEY + "' to define it."); } loadConfiguration(new File(configurationFile)); }
private Integer getRequiredIntegerProperty(Properties properties, String key) { String value = getRequiredProperty(properties, key); try { return Integer.valueOf(value); } catch (NumberFormatException e) { throw new IllegalArgumentException( "Restlet Cloud configuration file error. The property '" + key + "' should be a number", e); } }
DEFAULT_AGENT_SERVICE_URL); this.agentLogin = properties.getProperty("agent.login"); this.agentPassword = getRequiredProperty(properties, "agent.password") .toCharArray(); this.agentCellId = getRequiredIntegerProperty(properties, "agent.cellId"); this.agentCellVersion = getRequiredIntegerProperty(properties, "agent.cellVersion"); this.reverseProxyEnabled = Boolean.valueOf(getRequiredProperty( properties, "reverseProxy.enabled")); if (this.reverseProxyEnabled) { this.reverseProxyTargetUrl = getRequiredProperty(properties, "reverseProxy.targetUrl");
/** * Load the agent configuration from the file set by the system property * 'apiSparkServiceConfig'. * * @see #CONFIGURATION_FILE_SYSTEM_PROPERTY_KEY */ public void loadConfiguration() { String configurationFile = System .getProperty(CONFIGURATION_FILE_SYSTEM_PROPERTY_KEY); if (configurationFile == null) { throw new IllegalArgumentException( "Agent configuration file is not set. " + "Use system property '" + CONFIGURATION_FILE_SYSTEM_PROPERTY_KEY + "' to define it."); } loadConfiguration(new File(configurationFile)); }
private Integer getRequiredIntegerProperty(Properties properties, String key) { String value = getRequiredProperty(properties, key); try { return Integer.valueOf(value); } catch (NumberFormatException e) { throw new IllegalArgumentException( "Restlet Cloud configuration file error. The property '" + key + "' should be a number", e); } }
/** * Load the agent configuration from the file set by the system property * 'apiSparkServiceConfig'. * * @see #CONFIGURATION_FILE_SYSTEM_PROPERTY_KEY */ public void loadConfiguration() { String configurationFile = System .getProperty(CONFIGURATION_FILE_SYSTEM_PROPERTY_KEY); if (configurationFile == null) { throw new IllegalArgumentException( "Agent configuration file is not set. " + "Use system property '" + CONFIGURATION_FILE_SYSTEM_PROPERTY_KEY + "' to define it."); } loadConfiguration(new File(configurationFile)); }
private Integer getRequiredIntegerProperty(Properties properties, String key) { String value = getRequiredProperty(properties, key); try { return Integer.valueOf(value); } catch (NumberFormatException e) { throw new IllegalArgumentException( "Restlet Cloud configuration file error. The property '" + key + "' should be a number", e); } }
/** * Load the agent configuration from the file. * * @param configurationFile * The configuration file. */ public void loadConfiguration(File configurationFile) { if (configurationFile == null) { throw new IllegalArgumentException( "Restlet Cloud configuration file is null."); } if (!configurationFile.exists()) { throw new IllegalArgumentException( "Restlet Cloud configuration file does not exist: " + configurationFile.getAbsolutePath()); } try { loadConfiguration(new FileInputStream(configurationFile)); } catch (FileNotFoundException e) { throw new IllegalArgumentException( "Restlet Cloud configuration file error. See exception for details.", e); } }
/** * Load the agent configuration from the file. * * @param configurationFile * The configuration file. */ public void loadConfiguration(File configurationFile) { if (configurationFile == null) { throw new IllegalArgumentException( "Restlet Cloud configuration file is null."); } if (!configurationFile.exists()) { throw new IllegalArgumentException( "Restlet Cloud configuration file does not exist: " + configurationFile.getAbsolutePath()); } try { loadConfiguration(new FileInputStream(configurationFile)); } catch (FileNotFoundException e) { throw new IllegalArgumentException( "Restlet Cloud configuration file error. See exception for details.", e); } }
/** * Load the agent configuration from the file. * * @param configurationFile * The configuration file. */ public void loadConfiguration(File configurationFile) { if (configurationFile == null) { throw new IllegalArgumentException( "Restlet Cloud configuration file is null."); } if (!configurationFile.exists()) { throw new IllegalArgumentException( "Restlet Cloud configuration file does not exist: " + configurationFile.getAbsolutePath()); } try { loadConfiguration(new FileInputStream(configurationFile)); } catch (FileNotFoundException e) { throw new IllegalArgumentException( "Restlet Cloud configuration file error. See exception for details.", e); } }
/** * Load the agent configuration from the file. * * @param configurationFile * The configuration file. */ public void loadConfiguration(File configurationFile) { if (configurationFile == null) { throw new IllegalArgumentException( "Restlet Cloud configuration file is null."); } if (!configurationFile.exists()) { throw new IllegalArgumentException( "Restlet Cloud configuration file does not exist: " + configurationFile.getAbsolutePath()); } try { loadConfiguration(new FileInputStream(configurationFile)); } catch (FileNotFoundException e) { throw new IllegalArgumentException( "Restlet Cloud configuration file error. See exception for details.", e); } }