Hello all,

I was looking for async java http client.

I came across Apache asyncClient
<https://hc.apache.org/httpcomponents-asyncclient-4.0.x/index.html> and
went through the following examples
<https://hc.apache.org/httpcomponents-asyncclient-dev/httpasyncclient/examples/org/apache/http/examples/nio/client/AsyncClientHttpExchangeFutureCallback.java>
.

so in example we register a callback object and completed(...) get called
when the response of the request come back.

QUESTION:

Now internally does the ASyncClient

1 <https://hc.apache.org/httpcomponents-asyncclient-4.0.x/index.html> make
thread to wait per request or

2
<https://hc.apache.org/httpcomponents-asyncclient-dev/httpasyncclient/examples/org/apache/http/examples/nio/client/AsyncClientHttpExchangeFutureCallback.java>
it
actually use the NIO and make one thread to poll the socket selectors and
call the completed(...) method

Now if [2] is true than if i block the thread under completed(...) call
than

[1] how/will  AsyncClient be able to handle other responses.

[2] is there any configuration around number of thread which will poll
socket selectors



Thanks

Reply via email to