public static Integer getTimeoutValue(Timeout property, Map<String, ?> environment) { // Check for most specific system property first Integer timeoutSeconds = Integer.getInteger(property.toString()); if(timeoutSeconds != null) return timeoutSeconds; // Check for generic system property timeoutSeconds = Integer.getInteger(Timeout.GENERIC.toString()); if(timeoutSeconds != null) return timeoutSeconds; if(environment != null) { // Check most specific property in the environment timeoutSeconds = getInteger(environment.get(property.toString())); if(timeoutSeconds != null) return timeoutSeconds; // Check property in the environment timeoutSeconds = getInteger(environment.get(Timeout.GENERIC.toString())); if(timeoutSeconds != null) return timeoutSeconds; } return DEFAULT_TIMEOUT_SECONDS; }
public static Integer getTimeoutValue(Timeout property, Map<String, ?> environment) { // Check for most specific system property first Integer timeoutSeconds = Integer.getInteger(property.toString()); if(timeoutSeconds != null) return timeoutSeconds; // Check for generic system property timeoutSeconds = Integer.getInteger(Timeout.GENERIC.toString()); if(timeoutSeconds != null) return timeoutSeconds; if(environment != null) { // Check most specific property in the environment timeoutSeconds = getInteger(environment.get(property.toString())); if(timeoutSeconds != null) return timeoutSeconds; // Check property in the environment timeoutSeconds = getInteger(environment.get(Timeout.GENERIC.toString())); if(timeoutSeconds != null) return timeoutSeconds; } return DEFAULT_TIMEOUT_SECONDS; }
public static Integer getTimeoutValue(Timeout property, Map<String, ?> environment) { // Check for most specific system property first Integer timeoutSeconds = Integer.getInteger(property.toString()); if(timeoutSeconds != null) return timeoutSeconds; // Check for generic system property timeoutSeconds = Integer.getInteger(Timeout.GENERIC.toString()); if(timeoutSeconds != null) return timeoutSeconds; if(environment != null) { // Check most specific property in the environment timeoutSeconds = getInteger(environment.get(property.toString())); if(timeoutSeconds != null) return timeoutSeconds; // Check property in the environment timeoutSeconds = getInteger(environment.get(Timeout.GENERIC.toString())); if(timeoutSeconds != null) return timeoutSeconds; } return DEFAULT_TIMEOUT_SECONDS; }