protected CloseableHttpAsyncClient createHttpAsyncClient ( NHttpClientConnectionManager connectionManager ) { HttpAsyncClientBuilder builder = HttpAsyncClients . custom ( ) . setConnectionManager ( connectionManager ) ; int socketBufferSizeInBytes = this . config . getSocketBufferSizeInBytes ( ) ; if ( socketBufferSizeInBytes > 0 ) { builder . setDefaultConnectionConfig ( ConnectionConfig . custom ( ) . setBufferSize ( socketBufferSizeInBytes ) . build ( ) ) ; } return builder . build ( ) ; }
Create asynchronous http client based on connection manager .