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
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
-
Field Summary
Fields inherited from interface ca.uhn.fhir.rest.client.api.IRestfulClientFactory
DEFAULT_CONNECT_TIMEOUT, DEFAULT_CONNECTION_REQUEST_TIMEOUT, DEFAULT_CONNECTION_TTL, DEFAULT_POOL_MAX, DEFAULT_POOL_MAX_PER_ROUTE, DEFAULT_SERVER_VALIDATION_MODE, DEFAULT_SOCKET_TIMEOUT
-
Constructor Summary
ConstructorDescriptionConstructorApacheRestfulClientFactory
(ca.uhn.fhir.context.FhirContext theContext) Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected ca.uhn.fhir.rest.client.api.IHttpClient
getHttpClient
(String theServerBase) Get the http client for the given server baseca.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) protected org.apache.http.impl.client.HttpClientBuilder
org.apache.http.client.HttpClient
protected void
Reset the http client.void
setHttpClient
(Object theHttpClient) Only allows to set an instance of type org.apache.http.client.HttpClientvoid
Methods inherited from class ca.uhn.fhir.rest.client.impl.RestfulClientFactory
getConnectionRequestTimeout, getConnectionTimeToLive, getConnectTimeout, getFhirContext, getPoolMaxPerRoute, getPoolMaxTotal, getProxyPassword, getProxyUsername, getServerValidationMode, getServerValidationModeEnum, getSocketTimeout, newClient, newGenericClient, setConnectionRequestTimeout, setConnectionTimeToLive, setConnectTimeout, setFhirContext, setPoolMaxPerRoute, setPoolMaxTotal, setProxyCredentials, setServerValidationMode, setServerValidationModeEnum, setSocketTimeout, validateConfigured, validateServerBase, validateServerBaseIfConfiguredToDoSo
-
Constructor Details
-
ApacheRestfulClientFactory
public ApacheRestfulClientFactory()Constructor -
ApacheRestfulClientFactory
Constructor- Parameters:
theContext
- The context
-
-
Method Details
-
getHttpClient
Description copied from class:RestfulClientFactory
Get the http client for the given server base- Specified by:
getHttpClient
in 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
-
getHttpClientBuilder
-
resetHttpClient
Description copied from class:RestfulClientFactory
Reset the http client. This method is used when parameters have been set and a new http client needs to be created- Specified by:
resetHttpClient
in classRestfulClientFactory
-
setHttpClient
Only allows to set an instance of type org.apache.http.client.HttpClient- See Also:
-
setProxy
-