public abstract class RestfulClientFactory extends Object implements ca.uhn.fhir.rest.client.api.IRestfulClientFactory
| Constructor and Description |
|---|
RestfulClientFactory()
Constructor
|
RestfulClientFactory(ca.uhn.fhir.context.FhirContext theFhirContext)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
int |
getConnectionRequestTimeout() |
int |
getConnectTimeout() |
ca.uhn.fhir.context.FhirContext |
getFhirContext()
Return the fhir context
|
protected abstract ca.uhn.fhir.rest.client.api.IHttpClient |
getHttpClient(String theServerBase)
Get the http client for the given server base
|
int |
getPoolMaxPerRoute() |
int |
getPoolMaxTotal() |
protected String |
getProxyPassword()
Return the proxy password to authenticate with the HTTP proxy
|
protected String |
getProxyUsername()
Return the proxy username to authenticate with the HTTP proxy
|
ca.uhn.fhir.rest.client.api.ServerValidationModeEnum |
getServerValidationMode() |
ca.uhn.fhir.rest.client.api.ServerValidationModeEnum |
getServerValidationModeEnum()
Deprecated.
|
int |
getSocketTimeout() |
<T extends ca.uhn.fhir.rest.client.api.IRestfulClient> |
newClient(Class<T> theClientType,
String theServerBase)
Instantiates a new client instance
|
ca.uhn.fhir.rest.client.api.IGenericClient |
newGenericClient(String theServerBase) |
protected abstract void |
resetHttpClient()
Reset the http client.
|
void |
setConnectionRequestTimeout(int theConnectionRequestTimeout) |
void |
setConnectTimeout(int theConnectTimeout) |
void |
setFhirContext(ca.uhn.fhir.context.FhirContext theContext)
Sets the context associated with this client factory.
|
void |
setPoolMaxPerRoute(int thePoolMaxPerRoute) |
void |
setPoolMaxTotal(int thePoolMaxTotal) |
void |
setProxyCredentials(String theUsername,
String thePassword) |
void |
setServerValidationMode(ca.uhn.fhir.rest.client.api.ServerValidationModeEnum theServerValidationMode) |
void |
setServerValidationModeEnum(ca.uhn.fhir.rest.client.api.ServerValidationModeEnum theServerValidationMode)
Deprecated.
|
void |
setSocketTimeout(int theSocketTimeout) |
protected void |
validateConfigured()
Called automatically before the first use of this factory to ensure that
the configuration is sane.
|
void |
validateServerBase(String theServerBase,
ca.uhn.fhir.rest.client.api.IHttpClient theHttpClient,
ca.uhn.fhir.rest.client.api.IRestfulClient theClient) |
void |
validateServerBaseIfConfiguredToDoSo(String theServerBase,
ca.uhn.fhir.rest.client.api.IHttpClient theHttpClient,
ca.uhn.fhir.rest.client.api.IRestfulClient theClient) |
public RestfulClientFactory()
public RestfulClientFactory(ca.uhn.fhir.context.FhirContext theFhirContext)
theFhirContext - The contextpublic int getConnectionRequestTimeout()
getConnectionRequestTimeout in interface ca.uhn.fhir.rest.client.api.IRestfulClientFactorypublic int getConnectTimeout()
getConnectTimeout in interface ca.uhn.fhir.rest.client.api.IRestfulClientFactoryprotected String getProxyUsername()
protected String getProxyPassword()
public void setProxyCredentials(String theUsername, String thePassword)
setProxyCredentials in interface ca.uhn.fhir.rest.client.api.IRestfulClientFactorypublic ca.uhn.fhir.rest.client.api.ServerValidationModeEnum getServerValidationMode()
getServerValidationMode in interface ca.uhn.fhir.rest.client.api.IRestfulClientFactorypublic int getSocketTimeout()
getSocketTimeout in interface ca.uhn.fhir.rest.client.api.IRestfulClientFactorypublic int getPoolMaxTotal()
getPoolMaxTotal in interface ca.uhn.fhir.rest.client.api.IRestfulClientFactorypublic int getPoolMaxPerRoute()
getPoolMaxPerRoute in interface ca.uhn.fhir.rest.client.api.IRestfulClientFactorypublic <T extends ca.uhn.fhir.rest.client.api.IRestfulClient> T newClient(Class<T> theClientType, String theServerBase)
newClient in interface ca.uhn.fhir.rest.client.api.IRestfulClientFactorytheClientType - The client type, which is an interface type to be instantiatedtheServerBase - The URL of the base for the restful FHIR server to connect toca.uhn.fhir.context.ConfigurationException - If the interface type is not an interfaceprotected void validateConfigured()
super.validateConfigured()public ca.uhn.fhir.rest.client.api.IGenericClient newGenericClient(String theServerBase)
newGenericClient in interface ca.uhn.fhir.rest.client.api.IRestfulClientFactorypublic void setConnectionRequestTimeout(int theConnectionRequestTimeout)
setConnectionRequestTimeout in interface ca.uhn.fhir.rest.client.api.IRestfulClientFactorypublic void setConnectTimeout(int theConnectTimeout)
setConnectTimeout in interface ca.uhn.fhir.rest.client.api.IRestfulClientFactorypublic void setFhirContext(ca.uhn.fhir.context.FhirContext theContext)
public ca.uhn.fhir.context.FhirContext getFhirContext()
public void setServerValidationMode(ca.uhn.fhir.rest.client.api.ServerValidationModeEnum theServerValidationMode)
setServerValidationMode in interface ca.uhn.fhir.rest.client.api.IRestfulClientFactorypublic void setSocketTimeout(int theSocketTimeout)
setSocketTimeout in interface ca.uhn.fhir.rest.client.api.IRestfulClientFactorypublic void setPoolMaxTotal(int thePoolMaxTotal)
setPoolMaxTotal in interface ca.uhn.fhir.rest.client.api.IRestfulClientFactorypublic void setPoolMaxPerRoute(int thePoolMaxPerRoute)
setPoolMaxPerRoute in interface ca.uhn.fhir.rest.client.api.IRestfulClientFactory@Deprecated public ca.uhn.fhir.rest.client.api.ServerValidationModeEnum getServerValidationModeEnum()
getServerValidationModeEnum in interface ca.uhn.fhir.rest.client.api.IRestfulClientFactory@Deprecated public void setServerValidationModeEnum(ca.uhn.fhir.rest.client.api.ServerValidationModeEnum theServerValidationMode)
setServerValidationModeEnum in interface ca.uhn.fhir.rest.client.api.IRestfulClientFactorypublic void validateServerBaseIfConfiguredToDoSo(String theServerBase, ca.uhn.fhir.rest.client.api.IHttpClient theHttpClient, ca.uhn.fhir.rest.client.api.IRestfulClient theClient)
validateServerBaseIfConfiguredToDoSo in interface ca.uhn.fhir.rest.client.api.IRestfulClientFactorypublic void validateServerBase(String theServerBase, ca.uhn.fhir.rest.client.api.IHttpClient theHttpClient, ca.uhn.fhir.rest.client.api.IRestfulClient theClient)
validateServerBase in interface ca.uhn.fhir.rest.client.api.IRestfulClientFactoryprotected abstract ca.uhn.fhir.rest.client.api.IHttpClient getHttpClient(String theServerBase)
theServerBase - the server baseprotected abstract void resetHttpClient()
Copyright © 2014–2019 University Health Network. All rights reserved.