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
-
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
ConstructorDescriptionSslAwareApacheRestfulClientFactory
(FhirContext theFhirContext) SslAwareApacheRestfulClientFactory
(FhirContext fhirContext, org.apache.http.impl.client.HttpClientBuilder httpClientBuilder) -
Method Summary
Modifier and TypeMethodDescriptionprotected IHttpClient
getHttpClient
(String theServerBase) getHttpClient
(StringBuilder url, Map<String, List<String>> ifNoneExistParams, String ifNoneExistString, RequestTypeEnum theRequestType, List<Header> theHeaders) protected org.apache.http.client.HttpClient
FhirSecurityInformation<org.apache.http.impl.client.HttpClientBuilder>
initializeSecurityInformation
(boolean enabled, SSLContext sslContext, HostnameVerifier hostnameVerifier, String userName, String password) protected org.apache.http.impl.client.HttpClientBuilder
protected void
void
setHttpClient
(Object httpClient) Sets a completely configured HttpClient to be used.void
Methods inherited from class org.openehealth.ipf.commons.ihe.fhir.SslAwareAbstractRestfulClientFactory
customizeHttpClientBuilder, getSecurityInformation, httpClientBuilder, setSecurityInformation
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 Details
-
SslAwareApacheRestfulClientFactory
-
SslAwareApacheRestfulClientFactory
public SslAwareApacheRestfulClientFactory(FhirContext fhirContext, org.apache.http.impl.client.HttpClientBuilder httpClientBuilder)
-
-
Method Details
-
getHttpClient
- Specified by:
getHttpClient
in classca.uhn.fhir.rest.client.impl.RestfulClientFactory
-
resetHttpClient
protected void resetHttpClient()- Specified by:
resetHttpClient
in classca.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
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
-
newHttpClientBuilder
protected org.apache.http.impl.client.HttpClientBuilder newHttpClientBuilder()- Specified by:
newHttpClientBuilder
in classSslAwareAbstractRestfulClientFactory<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 classSslAwareAbstractRestfulClientFactory<org.apache.http.impl.client.HttpClientBuilder>
-