private CloseableHttpClient createHttpClient ( HttpClientConnectionManager connectionManager ) { HttpClientBuilder builder = HttpClients . custom ( ) . setConnectionManager ( connectionManager ) . disableAutomaticRetries ( ) ; int socketBufferSizeInBytes = this . config . getSocketBufferSizeInBytes ( ) ; if ( socketBufferSizeInBytes > 0 ) { builder . setDefaultConnectionConfig ( ConnectionConfig . custom ( ) . setBufferSize ( socketBufferSizeInBytes ) . build ( ) ) ; } return builder . build ( ) ; }
Create http client based on connection manager .