Hello,

 

We are in the process of migrating to HttpClient5 from AsyncClient4.1.3, and
we have some quiestions:

 

1.       this.rc = RequestConfig.custom().setAuthenticationEnabled(false).

 
setConnectionRequestTimeout(Timeout.ofMillis(this.poolTimeout)).

 
setConnectionRequestTimeout(this.poolTimeout, TimeUnit.MILLISECONDS).

 
setConnectionTimeout(Timeout.ofMillis(this.connectionTimeout)).

 
setConnectTimeout(this.connectionTimeout, TimeUnit.MILLISECONDS).

 

                I wrote here the 4 possible methods ‘setConnectionxxxxx’.
The two first have the same name and different parameters, two ways to do
the same.

But the next two methods seem to be the same, but the method names are
different. Shouldn’t the fourth method be ‘setConnectionTimeout’ as well?

                

 

2.       The
PoolingAsyncClientConnectionManagerBuilder.setConnectionTimeToLive() is the
keep alive to set to connections in this pool?

(similar to what we do in HttpAsyncClients.custom().setKeepAliveStrategy()?)

 

3.       In previous AsyncClient, we set the setSocketTimeout at
RequestConfig level, so on each request I could copy this base ‘rc’ and
modify the response timeout.

But this method does no longer exist in RequestConfig. Where can I set the
response timeout now for each request?

 

4.       I imagine the PoolConcurrencyPolicy cannot be modified after
creating the pool …

 

5.       Before I had this method to set buffer sizes (and modify them on
the fly), getting the ConnectionConfig from the pool:

 

public void setBufferInInterface(int bufferInInterface) { 

 
this.phccm.setDefaultConnectionConfig(ConnectionConfig.custom().setBufferSiz
e(bufferInInterface).setFragmentSizeHint(bufferInInterface).build()); 

}

 

How can I do this now?

 

 

Thanks,

 

Joan.

Reply via email to