public abstract class RestfulClientFactory extends Object implements IRestfulClientFactory
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 |
|---|
RestfulClientFactory()
Constructor
|
RestfulClientFactory(FhirContext theFhirContext)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
int |
getConnectionRequestTimeout() |
int |
getConnectTimeout() |
FhirContext |
getFhirContext()
Return the fhir context
|
protected abstract 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
|
ServerValidationModeEnum |
getServerValidationMode() |
ServerValidationModeEnum |
getServerValidationModeEnum()
Deprecated.
|
int |
getSocketTimeout() |
<T extends IRestfulClient> |
newClient(Class<T> theClientType,
String theServerBase)
Instantiates a new client instance
|
IGenericClient |
newGenericClient(String theServerBase) |
protected abstract void |
resetHttpClient()
Reset the http client.
|
void |
setConnectionRequestTimeout(int theConnectionRequestTimeout) |
void |
setConnectTimeout(int theConnectTimeout) |
void |
setFhirContext(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(ServerValidationModeEnum theServerValidationMode) |
void |
setServerValidationModeEnum(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,
IHttpClient theHttpClient,
IRestfulClient theClient) |
void |
validateServerBaseIfConfiguredToDoSo(String theServerBase,
IHttpClient theHttpClient,
IRestfulClient theClient) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetHttpClient, setHttpClient, setProxypublic RestfulClientFactory()
public RestfulClientFactory(FhirContext theFhirContext)
theFhirContext - The contextpublic int getConnectionRequestTimeout()
getConnectionRequestTimeout in interface IRestfulClientFactorypublic int getConnectTimeout()
getConnectTimeout in interface IRestfulClientFactoryprotected String getProxyUsername()
protected String getProxyPassword()
public void setProxyCredentials(String theUsername, String thePassword)
setProxyCredentials in interface IRestfulClientFactorypublic ServerValidationModeEnum getServerValidationMode()
getServerValidationMode in interface IRestfulClientFactorypublic int getSocketTimeout()
getSocketTimeout in interface IRestfulClientFactorypublic int getPoolMaxTotal()
getPoolMaxTotal in interface IRestfulClientFactorypublic int getPoolMaxPerRoute()
getPoolMaxPerRoute in interface IRestfulClientFactorypublic <T extends IRestfulClient> T newClient(Class<T> theClientType, String theServerBase)
newClient in interface IRestfulClientFactorytheClientType - The client type, which is an interface type to be instantiatedtheServerBase - The URL of the base for the restful FHIR server to connect toConfigurationException - If the interface type is not an interfaceprotected void validateConfigured()
super.validateConfigured()public IGenericClient newGenericClient(String theServerBase)
newGenericClient in interface IRestfulClientFactorypublic void setConnectionRequestTimeout(int theConnectionRequestTimeout)
setConnectionRequestTimeout in interface IRestfulClientFactorypublic void setConnectTimeout(int theConnectTimeout)
setConnectTimeout in interface IRestfulClientFactorypublic void setFhirContext(FhirContext theContext)
public FhirContext getFhirContext()
public void setServerValidationMode(ServerValidationModeEnum theServerValidationMode)
setServerValidationMode in interface IRestfulClientFactorypublic void setSocketTimeout(int theSocketTimeout)
setSocketTimeout in interface IRestfulClientFactorypublic void setPoolMaxTotal(int thePoolMaxTotal)
setPoolMaxTotal in interface IRestfulClientFactorypublic void setPoolMaxPerRoute(int thePoolMaxPerRoute)
setPoolMaxPerRoute in interface IRestfulClientFactory@Deprecated public ServerValidationModeEnum getServerValidationModeEnum()
getServerValidationModeEnum in interface IRestfulClientFactory@Deprecated public void setServerValidationModeEnum(ServerValidationModeEnum theServerValidationMode)
setServerValidationModeEnum in interface IRestfulClientFactorypublic void validateServerBaseIfConfiguredToDoSo(String theServerBase, IHttpClient theHttpClient, IRestfulClient theClient)
validateServerBaseIfConfiguredToDoSo in interface IRestfulClientFactorypublic void validateServerBase(String theServerBase, IHttpClient theHttpClient, IRestfulClient theClient)
validateServerBase in interface IRestfulClientFactoryprotected abstract IHttpClient getHttpClient(String theServerBase)
theServerBase - the server baseprotected abstract void resetHttpClient()
Copyright © 2014–2018 University Health Network. All rights reserved.