Merge pull request #12 from janih/master
Retry handler setter for HttpClientFeedFetcher
This commit is contained in:
commit
1b3886ee6a
1 changed files with 9 additions and 0 deletions
|
@ -29,9 +29,11 @@ import org.apache.commons.httpclient.Header;
|
|||
import org.apache.commons.httpclient.HttpClient;
|
||||
import org.apache.commons.httpclient.HttpException;
|
||||
import org.apache.commons.httpclient.HttpMethod;
|
||||
import org.apache.commons.httpclient.HttpMethodRetryHandler;
|
||||
import org.apache.commons.httpclient.auth.AuthScope;
|
||||
import org.apache.commons.httpclient.methods.GetMethod;
|
||||
import org.apache.commons.httpclient.params.HttpClientParams;
|
||||
import org.apache.commons.httpclient.params.HttpMethodParams;
|
||||
|
||||
import com.rometools.fetcher.FetcherEvent;
|
||||
import com.rometools.fetcher.FetcherException;
|
||||
|
@ -68,6 +70,13 @@ public class HttpClientFeedFetcher extends AbstractFeedFetcher {
|
|||
setCredentialSupplier(credentialSupplier);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param handler Sets the retry handler
|
||||
*/
|
||||
public synchronized void setRetryHandler(HttpMethodRetryHandler handler) {
|
||||
httpClientParams.setParameter(HttpMethodParams.RETRY_HANDLER, handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param timeout Sets the connect timeout for the HttpClient but using the URLConnection method
|
||||
* name. Uses the HttpClientParams method setConnectionManagerTimeout instead of
|
||||
|
|
Loading…
Reference in a new issue