private static final String METHOD_POST = "post";
private static final String METHOD_GET = "get";
+ private static final int MAX_TRIES = 3;
+ private static final int MAX_DELAY = 5000;
+
private PrintStream _os;
public ConfigurationParser(PrintStream aOs) {
NameValuePair[] paramsArray = params.toArray(new NameValuePair[0]);
PageRequest request;
if ( METHOD_POST.equals(method)) {
- request = new PostPageRequest(paramsArray, xslt, _os);
+ request = new PostPageRequest(MAX_TRIES, MAX_DELAY, paramsArray, xslt, _os);
}
else if ( METHOD_GET.equals(method) || method == null ){
- request = new GetPageRequest(paramsArray, xslt, _os);
+ request = new GetPageRequest(MAX_TRIES, MAX_DELAY, paramsArray, xslt, _os);
} else {
throw new RuntimeException("Unknown request method '" + method + "'. Only " +
METHOD_GET + " and " + METHOD_POST + " are supported");