private InputStream getPropertiesFromServerViaHttp(final String message, final String httpPathExtension) throws ConfigurationSetupException { StringBuilder text = new StringBuilder("Can't connect to "); if (connections.length > 1) text.append("any of the servers ["); else text.append("server ["); for (int i = 0; i < connections.length; i++) { if (i > 0) text.append(", "); text.append(connections[i]); } text.append("]."); boolean loggedInConsole = false; int count = 0; while (true) { count++; InputStream in = getPropertiesFromL2Stream(message, httpPathExtension); if (in != null) { return in; } if (loggedInConsole == false) { consoleLogger.warn(text + "Retrying... \n"); loggedInConsole = true; } if (connections.length > 1) { logger.warn(text + "Retrying... \n"); } if (MAX_CONNECT_TRIES > 0 && count >= MAX_CONNECT_TRIES) { throw new ConfigurationSetupException(text.toString()); } ThreadUtil.reallySleep(connectRetryInterval); } }
private InputStream getPropertiesFromServerViaHttp(final String message, final String httpPathExtension) throws ConfigurationSetupException { StringBuilder text = new StringBuilder("Can't connect to "); if (connections.length > 1) text.append("any of the servers ["); else text.append("server ["); for (int i = 0; i < connections.length; i++) { if (i > 0) text.append(", "); text.append(connections[i]); } text.append("]."); boolean loggedInConsole = false; int count = 0; while (true) { count++; InputStream in = getPropertiesFromL2Stream(message, httpPathExtension); if (in != null) { return in; } if (loggedInConsole == false) { consoleLogger.warn(text + "Retrying... \n"); loggedInConsole = true; } if (connections.length > 1) { logger.warn(text + "Retrying... \n"); } if (MAX_CONNECT_TRIES > 0 && count >= MAX_CONNECT_TRIES) { throw new ConfigurationSetupException(text.toString()); } ThreadUtil.reallySleep(connectRetryInterval); } }
private InputStream getPropertiesFromServerViaHttp(final String message, final String httpPathExtension) throws ConfigurationSetupException { StringBuilder text = new StringBuilder("Can't connect to "); if (connections.length > 1) text.append("any of the servers ["); else text.append("server ["); for (int i = 0; i < connections.length; i++) { if (i > 0) text.append(", "); text.append(connections[i]); } text.append("]."); boolean loggedInConsole = false; int count = 0; while (true) { count++; InputStream in = getPropertiesFromL2Stream(message, httpPathExtension); if (in != null) { return in; } if (loggedInConsole == false) { consoleLogger.warn(text + "Retrying... \n"); loggedInConsole = true; } if (connections.length > 1) { logger.warn(text + "Retrying... \n"); } if (MAX_CONNECT_TRIES > 0 && count >= MAX_CONNECT_TRIES) { throw new ConfigurationSetupException(text.toString()); } ThreadUtil.reallySleep(connectRetryInterval); } }