Class SslAwareApacheRestfulClientFactory

java.lang.Object
ca.uhn.fhir.rest.client.impl.RestfulClientFactory
org.openehealth.ipf.commons.ihe.fhir.SslAwareAbstractRestfulClientFactory<org.apache.http.impl.client.HttpClientBuilder>
org.openehealth.ipf.commons.ihe.fhir.SslAwareApacheRestfulClientFactory
All Implemented Interfaces:
IRestfulClientFactory

public class SslAwareApacheRestfulClientFactory extends SslAwareAbstractRestfulClientFactory<org.apache.http.impl.client.HttpClientBuilder>
RestfulClientFactory that is aware of SSL context parameters.
Author:
Christian Ohr
  • Constructor Details

    • SslAwareApacheRestfulClientFactory

      public SslAwareApacheRestfulClientFactory(FhirContext theFhirContext)
    • SslAwareApacheRestfulClientFactory

      public SslAwareApacheRestfulClientFactory(FhirContext fhirContext, org.apache.http.impl.client.HttpClientBuilder httpClientBuilder)
  • Method Details

    • getHttpClient

      protected IHttpClient getHttpClient(String theServerBase)
      Specified by:
      getHttpClient in class ca.uhn.fhir.rest.client.impl.RestfulClientFactory
    • resetHttpClient

      protected void resetHttpClient()
      Specified by:
      resetHttpClient in class ca.uhn.fhir.rest.client.impl.RestfulClientFactory
    • getHttpClient

      public IHttpClient getHttpClient(StringBuilder url, Map<String,List<String>> ifNoneExistParams, String ifNoneExistString, RequestTypeEnum theRequestType, List<Header> theHeaders)
    • setHttpClient

      public void setHttpClient(Object httpClient)
      Sets a completely configured HttpClient to be used. No further configuration is done (timeouts, security etc.) before it is used.
      Parameters:
      httpClient - Http client instance
    • setProxy

      public void setProxy(String host, Integer port)
    • newHttpClientBuilder

      protected org.apache.http.impl.client.HttpClientBuilder newHttpClientBuilder()
      Specified by:
      newHttpClientBuilder in class SslAwareAbstractRestfulClientFactory<org.apache.http.impl.client.HttpClientBuilder>
    • getNativeHttpClient

      protected org.apache.http.client.HttpClient getNativeHttpClient()
    • initializeSecurityInformation

      public FhirSecurityInformation<org.apache.http.impl.client.HttpClientBuilder> initializeSecurityInformation(boolean enabled, SSLContext sslContext, HostnameVerifier hostnameVerifier, String userName, String password)
      Specified by:
      initializeSecurityInformation in class SslAwareAbstractRestfulClientFactory<org.apache.http.impl.client.HttpClientBuilder>