Class DefaultHttpClientFactory

  • All Implemented Interfaces:
    HttpClientFactory

    public class DefaultHttpClientFactory
    extends Object
    implements HttpClientFactory
    Creates a CloseableHttpClient instance. Supports certificate based communication.
    • Constructor Detail

      • DefaultHttpClientFactory

        public DefaultHttpClientFactory()
    • Method Detail

      • createClient

        public org.apache.http.impl.client.CloseableHttpClient createClient​(ClientIdentity clientIdentity)
                                                                     throws HttpClientException
        Description copied from interface: HttpClientFactory
        Provides CloseableHttpClient based on ClientIdentity details. For ClientIdentity that is certificate based it will resolve https client using the provided ClientIdentity, if the ClientIdentity wasn't provided it will return default HttpClient.
        Specified by:
        createClient in interface HttpClientFactory
        Parameters:
        clientIdentity - for X.509 certificate based communication ClientCertificate implementation of ClientIdentity interface should be provided
        Returns:
        HTTP or HTTPS client
        Throws:
        HttpClientException - in case HTTPS Client could not be setup