Package ca.uhn.fhir.rest.client.apache
Class ApacheRestfulClientFactory
- java.lang.Object
-
- ca.uhn.fhir.rest.client.impl.RestfulClientFactory
-
- ca.uhn.fhir.rest.client.apache.ApacheRestfulClientFactory
-
- All Implemented Interfaces:
ca.uhn.fhir.rest.client.api.IRestfulClientFactory
public class ApacheRestfulClientFactory extends RestfulClientFactory
A Restful Factory to create clients, requests and responses based on the Apache httpclient library.- Author:
- Peter Van Houte | peter.vanhoute@agfa.com | Agfa Healthcare
-
-
Constructor Summary
Constructors Constructor Description ApacheRestfulClientFactory()ConstructorApacheRestfulClientFactory(ca.uhn.fhir.context.FhirContext theContext)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ApacheHttpClientgetHttpClient(String theServerBase)Get the http client for the given server baseca.uhn.fhir.rest.client.api.IHttpClientgetHttpClient(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)org.apache.http.client.HttpClientgetNativeHttpClient()protected voidresetHttpClient()Reset the http client.voidsetHttpClient(Object theHttpClient)Only allows to set an instance of type org.apache.http.client.HttpClientvoidsetProxy(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
-
-
-
-
Constructor Detail
-
ApacheRestfulClientFactory
public ApacheRestfulClientFactory()
Constructor
-
ApacheRestfulClientFactory
public ApacheRestfulClientFactory(ca.uhn.fhir.context.FhirContext theContext)
Constructor- Parameters:
theContext- The context
-
-
Method Detail
-
getHttpClient
protected ApacheHttpClient getHttpClient(String theServerBase)
Description copied from class:RestfulClientFactoryGet the http client for the given server base- Specified by:
getHttpClientin classRestfulClientFactory- Parameters:
theServerBase- the server base- Returns:
- the http client
-
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)
-
getNativeHttpClient
public org.apache.http.client.HttpClient getNativeHttpClient()
-
resetHttpClient
protected void resetHttpClient()
Description copied from class:RestfulClientFactoryReset the http client. This method is used when parameters have been set and a new http client needs to be created- Specified by:
resetHttpClientin classRestfulClientFactory
-
setHttpClient
public void setHttpClient(Object theHttpClient)
Only allows to set an instance of type org.apache.http.client.HttpClient- See Also:
ca.uhn.fhir.rest.client.api.IRestfulClientFactory#setHttpClient(ca.uhn.fhir.rest.client.api.IHttpClient)
-
-