[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-2019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16962060#comment-16962060
 ] 

Michael Osipov edited comment on HTTPCLIENT-2019 at 10/29/19 7:45 PM:
----------------------------------------------------------------------

My bad, sorry. But I had the right class in mind. So the new interface might be:
{code:java}
interface HttpRequestRetryStrategy {

    boolean retryRequest(IOException exception, int executionCount, HttpContext 
context);
    boolean retryRequest(HttpResponse response, int executionCount, HttpContext 
context);
    TimeValue getRetryInterval(HttpResponse response, int executionCount, 
HttpContext context);

}
{code}


was (Author: michael-o):
My bad, sorry. But I had the right class in mind. So the new interface might be:

{code:java}
interface HttpRequestRetryStrategy {

    boolean retryRequest(IOException exception, int executionCount, HttpContext 
context);
    boolean retryRequest(HttpResponse response, int executionCount, HttpContext 
context);
    TimeValue getRetryInterval();

}
{code}

> Deprecate ServiceUnavailableRetryStrategy in favor or a more generic name
> -------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-2019
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2019
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpClient (classic)
>    Affects Versions: 4.5.10, 5.0 Beta6
>            Reporter: Michael Osipov
>            Priority: Major
>              Labels: stuck, volunteers-wanted
>             Fix For: Stuck
>
>
> Based on a 
> [discussion|http://mail-archives.apache.org/mod_mbox/hc-dev/201910.mbox/%3Cff79e9739c5aa8639ee785e6848c9e5112113ee5.camel%40apache.org%3E]
>  on the mailing list, the name {{ServiceUnavailableRetryStrategy}} implies 
> that this interface is only suited for HTTP status code 503, but you make 
> handle any 3xx, 4xx, 5xx code. Therefore, this interface should be renamed to 
> something better/more generic like {{RetryStrategy}}.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to