[
https://issues.apache.org/jira/browse/HTTPCLIENT-1928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16539688#comment-16539688
]
ASF GitHub Bot commented on HTTPCLIENT-1928:
--------------------------------------------
GitHub user xiaohu-zhang opened a pull request:
https://github.com/apache/httpcomponents-client/pull/106
HTTPCLIENT-1928
warning:IgnoreCompelteExceptonFutureCallback should be in
org.apache.hc.core5.concurrent package in httpcore5 project.put here
just for pass the cli check.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/xiaohu-zhang/httpcomponents-client
ignoreCompleteException
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/httpcomponents-client/pull/106.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #106
----
commit f78e24c0855081ac89129e09eba97d4edf890600
Author: xiaohu-zhang <silver9886@...>
Date: 2018-07-11T08:05:38Z
HTTPCLIENT-1928
warning:IgnoreCompelteExceptonFutureCallback should be in
org.apache.hc.core5.concurrent package in httpcore5 project.put here
just for pass the cli check.
----
> HttpAsyncClient callback should ignore exception throwed by compelete method
> ----------------------------------------------------------------------------
>
> Key: HTTPCLIENT-1928
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1928
> Project: HttpComponents HttpClient
> Issue Type: Improvement
> Reporter: silver9886
> Priority: Major
>
> If exception throwed by completed method in FutureCallback argument in
> HttpAsyncClient.execute,the connection will be closed.
> but the exception throwed by customer code,should not affect the connection
> managed by the framework,the connection should be connected also.
> there can be a class called FutureCallbackIgnorecompelteExcepton class.
> public abstract class FutureCallbackIgnorecompelteExcepton <T> {
> private FutureCallback<T> t;
> void completed(T result){
> try{
> t.completed(result);
> }catch(Exception e)
> //ignore
> }
> void failed(Exception ex);
> void cancelled();
> }
> HttpAsyncClient changed as:
> HttpAsyncClient.<T> Future<T> execute(
> AsyncRequestProducer requestProducer,
> AsyncResponseConsumer<T> responseConsumer,
> HttpContext context,
> FutureCallbackIgnorecompelteExcepton <T> callback);
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]