Code example for DefaultHttpRequestRetryHandler

0
    public void setRetryCount(int retryCount) {
        if (retryCount < 0) {
            throw new IllegalArgumentException("Invalid retry count: " + retryCount);
        } 
         
        final HttpRequestRetryHandler retryHandler = new DefaultHttpRequestRetryHandler(retryCount,
                true); 
        loginClient.setHttpRequestRetryHandler(retryHandler);
        if (delegateWasSet) {
            final DefaultHttpClient client = (DefaultHttpClient) delegate;
            client.setHttpRequestRetryHandler(retryHandler);
        } 
    } 
     
    public void setAccount(String accountName) {
        if (accountName == null) {
            throw new IllegalArgumentException("Account name is required");
        } 
        if (account != null && !account.name.equals(accountName)) {
            // reset authentication cookie since account name is different 
Contextual code suggestions in your IDE  Get Codota for Java