Class OkHttpRestfulClientFactory

java.lang.Object
ca.uhn.fhir.rest.client.impl.RestfulClientFactory
ca.uhn.fhir.okhttp.client.OkHttpRestfulClientFactory
All Implemented Interfaces:
ca.uhn.fhir.rest.client.api.IRestfulClientFactory

public class OkHttpRestfulClientFactory extends ca.uhn.fhir.rest.client.impl.RestfulClientFactory
A Restful client factory based on OkHttp.
Author:
Matthew Clarke | matthew.clarke@orionhealth.com | Orion Health
  • Field Summary

    Fields inherited from interface ca.uhn.fhir.rest.client.api.IRestfulClientFactory

    DEFAULT_CONNECT_TIMEOUT, DEFAULT_CONNECTION_REQUEST_TIMEOUT, DEFAULT_POOL_MAX, DEFAULT_POOL_MAX_PER_ROUTE, DEFAULT_SERVER_VALIDATION_MODE, DEFAULT_SOCKET_TIMEOUT
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    OkHttpRestfulClientFactory​(ca.uhn.fhir.context.FhirContext theFhirContext)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected ca.uhn.fhir.rest.client.api.IHttpClient
    getHttpClient​(String theServerBase)
     
    ca.uhn.fhir.rest.client.api.IHttpClient
    getHttpClient​(StringBuilder theUrl, Map<String,​List<String>> theIfNoneExistParams, String theIfNoneExistString, ca.uhn.fhir.rest.api.RequestTypeEnum theRequestType, List<ca.uhn.fhir.rest.client.api.Header> theHeaders)
     
    okhttp3.Call.Factory
     
    protected void
     
    void
    setHttpClient​(Object okHttpClient)
    Only accepts clients of type OkHttpClient
    void
    setProxy​(String theHost, Integer thePort)
     

    Methods inherited from class ca.uhn.fhir.rest.client.impl.RestfulClientFactory

    getConnectionRequestTimeout, getConnectTimeout, getFhirContext, getPoolMaxPerRoute, getPoolMaxTotal, getProxyPassword, getProxyUsername, getServerValidationMode, getServerValidationModeEnum, getSocketTimeout, newClient, newGenericClient, setConnectionRequestTimeout, setConnectTimeout, setFhirContext, setPoolMaxPerRoute, setPoolMaxTotal, setProxyCredentials, setServerValidationMode, setServerValidationModeEnum, setSocketTimeout, validateConfigured, validateServerBase, validateServerBaseIfConfiguredToDoSo

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getHttpClient

      protected ca.uhn.fhir.rest.client.api.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
    • getNativeClient

      public okhttp3.Call.Factory getNativeClient()
    • getHttpClient

      public ca.uhn.fhir.rest.client.api.IHttpClient getHttpClient(StringBuilder theUrl, Map<String,​List<String>> theIfNoneExistParams, String theIfNoneExistString, ca.uhn.fhir.rest.api.RequestTypeEnum theRequestType, List<ca.uhn.fhir.rest.client.api.Header> theHeaders)
    • setHttpClient

      public void setHttpClient(Object okHttpClient)
      Only accepts clients of type OkHttpClient
      Parameters:
      okHttpClient -
    • setProxy

      public void setProxy(String theHost, Integer thePort)