public class ApacheRestfulClientFactory extends RestfulClientFactory
DEFAULT_CONNECT_TIMEOUT, DEFAULT_CONNECTION_REQUEST_TIMEOUT, DEFAULT_POOL_MAX, DEFAULT_POOL_MAX_PER_ROUTE, DEFAULT_SERVER_VALIDATION_MODE, DEFAULT_SOCKET_TIMEOUT| Constructor and Description |
|---|
ApacheRestfulClientFactory()
Constructor
|
ApacheRestfulClientFactory(FhirContext theContext)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected ApacheHttpClient |
getHttpClient(String theServerBase)
Get the http client for the given server base
|
IHttpClient |
getHttpClient(StringBuilder theUrl,
Map<String,List<String>> theIfNoneExistParams,
String theIfNoneExistString,
RequestTypeEnum theRequestType,
List<Header> theHeaders)
Returns the HTTP client instance.
|
org.apache.http.client.HttpClient |
getNativeHttpClient() |
protected void |
resetHttpClient()
Reset the http client.
|
void |
setHttpClient(Object theHttpClient)
Only allows to set an instance of type org.apache.http.client.HttpClient
|
void |
setProxy(String theHost,
Integer thePort)
Sets the HTTP proxy to use for outgoing connections
|
getConnectionRequestTimeout, getConnectTimeout, getFhirContext, getPoolMaxPerRoute, getPoolMaxTotal, getProxyPassword, getProxyUsername, getServerValidationMode, getServerValidationModeEnum, getSocketTimeout, newClient, newGenericClient, setConnectionRequestTimeout, setConnectTimeout, setFhirContext, setPoolMaxPerRoute, setPoolMaxTotal, setProxyCredentials, setServerValidationMode, setServerValidationModeEnum, setSocketTimeout, validateConfigured, validateServerBase, validateServerBaseIfConfiguredToDoSopublic ApacheRestfulClientFactory()
public ApacheRestfulClientFactory(FhirContext theContext)
theContext - The contextprotected ApacheHttpClient getHttpClient(String theServerBase)
RestfulClientFactorygetHttpClient in class RestfulClientFactorytheServerBase - the server basepublic IHttpClient getHttpClient(StringBuilder theUrl, Map<String,List<String>> theIfNoneExistParams, String theIfNoneExistString, RequestTypeEnum theRequestType, List<Header> theHeaders)
IRestfulClientFactorytheUrl - The complete FHIR url to which the http request will be senttheIfNoneExistParams - The params for header "If-None-Exist" as a hashmaptheIfNoneExistString - The param for header "If-None-Exist" as a stringtheRequestType - the type of HTTP request (GET, DELETE, ..)theHeaders - the headers to be sent together with the http requestpublic org.apache.http.client.HttpClient getNativeHttpClient()
protected void resetHttpClient()
RestfulClientFactoryresetHttpClient in class RestfulClientFactorypublic void setHttpClient(Object theHttpClient)
theHttpClient - An HTTP client instance to use, or nullca.uhn.fhir.rest.client.IRestfulClientFactory#setHttpClient(ca.uhn.fhir.rest.client.api.IHttpClient)public void setProxy(String theHost, Integer thePort)
IRestfulClientFactorytheHost - The host (or null to disable proxying, as is the default)thePort - The port (or null to disable proxying, as is the default)Copyright © 2014–2017 University Health Network. All rights reserved.