public final static String CONSOLE_OUTPUT = "__console_output";
+ public final static String HTTP_GET_THROTTLE = "http.get.throttle";
+
+ public final static String HTTP_PUT_THROTTLE = "http.put.throttle";
+
public final static String HTTP_TIMEOUT = "http.timeout";
public final static String HTTP_PROXYHOST = "http.proxyHost";
try {
String wordWrap = resourceBundle.getString(key);
Boolean b = Boolean.valueOf(wordWrap);
- if (b.booleanValue()) {
+ if (b.booleanValue()) {
store.setDefault(key, "true");
} else {
store.setDefault(key, "false");
store.setDefault(key, "false");
}
+ key = HTTP_GET_THROTTLE;
+ try {
+ String timeout = resourceBundle.getString(key);
+ int val = Integer.parseInt(timeout);
+ if (val > 0) {
+ val *= 1000;
+ } else {
+ val = 1000;
+ }
+ store.setDefault(key, Integer.toString(val));
+ } catch (Exception e) {
+ store.setDefault(key, "1000"); // 1 second
+ }
+
+ key = HTTP_PUT_THROTTLE;
+ try {
+ String timeout = resourceBundle.getString(key);
+ int val = Integer.parseInt(timeout);
+ if (val > 0) {
+ val *= 1000;
+ } else {
+ val = 5000;
+ }
+ store.setDefault(key, Integer.toString(val));
+ } catch (Exception e) {
+ store.setDefault(key, "5000"); // 5 seconds
+ }
+
key = HTTP_TIMEOUT;
try {
String timeout = resourceBundle.getString(key);