+ protected void setClientTimeouts(Client client) {
+ client.property(ClientProperties.CONNECT_TIMEOUT, httpConnectTimeout);
+ client.property(ClientProperties.READ_TIMEOUT, httpReadTimeout);
+ }
+
+ protected Integer readOptionalInteger(String propertyName, Integer defaultValue) {
+ String stringValue = System.getProperty(propertyName);
+ if (stringValue != null && stringValue.length() > 0) {
+ try {
+ return Integer.valueOf(stringValue);
+ } catch (NumberFormatException e) {
+ log.warn("property " + propertyName + " had the value " + stringValue + " that could not be converted to an Integer, default " + defaultValue + " will be used instead", e);
+ }
+ }
+ return defaultValue;
+ }
+
+