public interface IRestfulClientFactory
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_CONNECT_TIMEOUT
Default value for
getConnectTimeout() |
static int |
DEFAULT_CONNECTION_REQUEST_TIMEOUT
Default value for
getConnectionRequestTimeout() |
static int |
DEFAULT_POOL_MAX
Default value for
() |
static int |
DEFAULT_POOL_MAX_PER_ROUTE
Default value for
getPoolMaxPerRoute() |
static ServerValidationModeEnum |
DEFAULT_SERVER_VALIDATION_MODE
Default value for
getServerValidationModeEnum() |
static int |
DEFAULT_SOCKET_TIMEOUT
Default value for
getSocketTimeout() |
| Modifier and Type | Method and Description |
|---|---|
int |
getConnectionRequestTimeout()
Gets the connection request timeout, in milliseconds.
|
int |
getConnectTimeout()
Gets the connect timeout, in milliseconds.
|
org.apache.http.client.HttpClient |
getHttpClient()
Returns the Apache HTTP client instance.
|
int |
getPoolMaxPerRoute()
Gets the maximum number of connections per route allowed in the pool.
|
int |
getPoolMaxTotal()
Gets the maximum number of connections allowed in the pool.
|
ServerValidationModeEnum |
getServerValidationMode()
Gets the server validation mode for any clients created from this factory.
|
ServerValidationModeEnum |
getServerValidationModeEnum()
Deprecated.
Use
getServerValidationMode() instead |
int |
getSocketTimeout()
Gets the socket timeout, in milliseconds.
|
<T extends IRestfulClient> |
newClient(Class<T> theClientType,
String theServerBase)
Instantiates a new client instance
|
IGenericClient |
newGenericClient(String theServerBase)
Instantiates a new generic client instance
|
void |
setConnectionRequestTimeout(int theConnectionRequestTimeout)
Sets the connection request timeout, in milliseconds.
|
void |
setConnectTimeout(int theConnectTimeout)
Sets the connect timeout, in milliseconds.
|
void |
setHttpClient(org.apache.http.client.HttpClient theHttpClient)
Sets the Apache HTTP client instance to be used by any new restful clients created by this factory.
|
void |
setPoolMaxPerRoute(int thePoolMaxPerRoute)
Sets the maximum number of connections per route allowed in the pool.
|
void |
setPoolMaxTotal(int thePoolMaxTotal)
Sets the maximum number of connections allowed in the pool.
|
void |
setProxy(String theHost,
Integer thePort)
Sets the HTTP proxy to use for outgoing connections
|
void |
setProxyCredentials(String theUsername,
String thePassword)
Sets the credentials to use to authenticate with the HTTP proxy,
if one is defined.
|
void |
setServerValidationMode(ServerValidationModeEnum theServerValidationMode)
Sets the server validation mode for any clients created from this factory.
|
void |
setServerValidationModeEnum(ServerValidationModeEnum theServerValidationMode)
Deprecated.
Use
setServerValidationMode(ServerValidationModeEnum) instead. This method was incorrectly named. |
void |
setSocketTimeout(int theSocketTimeout)
Sets the socket timeout, in milliseconds.
|
static final int DEFAULT_CONNECT_TIMEOUT
getConnectTimeout()static final int DEFAULT_CONNECTION_REQUEST_TIMEOUT
getConnectionRequestTimeout()static final ServerValidationModeEnum DEFAULT_SERVER_VALIDATION_MODE
getServerValidationModeEnum()static final int DEFAULT_SOCKET_TIMEOUT
getSocketTimeout()static final int DEFAULT_POOL_MAX
()static final int DEFAULT_POOL_MAX_PER_ROUTE
getPoolMaxPerRoute()int getConnectionRequestTimeout()
The default value for this setting is defined by DEFAULT_CONNECTION_REQUEST_TIMEOUT
int getConnectTimeout()
The default value for this setting is defined by DEFAULT_CONNECT_TIMEOUT
org.apache.http.client.HttpClient getHttpClient()
setHttpClient(HttpClient)@Deprecated ServerValidationModeEnum getServerValidationModeEnum()
getServerValidationMode() insteadServerValidationModeEnum getServerValidationMode()
The default value for this setting is defined by DEFAULT_SERVER_VALIDATION_MODE
int getSocketTimeout()
The default value for this setting is defined by DEFAULT_SOCKET_TIMEOUT
int getPoolMaxTotal()
The default value for this setting is defined by DEFAULT_POOL_MAX
int getPoolMaxPerRoute()
The default value for this setting is defined by DEFAULT_POOL_MAX_PER_ROUTE
<T extends IRestfulClient> T newClient(Class<T> theClientType, String theServerBase)
theClientType - 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 interfaceIGenericClient newGenericClient(String theServerBase)
theServerBase - The URL of the base for the restful FHIR server to connect tovoid setConnectionRequestTimeout(int theConnectionRequestTimeout)
The default value for this setting is defined by DEFAULT_CONNECTION_REQUEST_TIMEOUT
void setConnectTimeout(int theConnectTimeout)
The default value for this setting is defined by DEFAULT_CONNECT_TIMEOUT
void setHttpClient(org.apache.http.client.HttpClient theHttpClient)
null, a new HTTP client with default settings will be created.theHttpClient - An HTTP client instance to use, or nullvoid setProxy(String theHost, Integer thePort)
theHost - The host (or null to disable proxying, as is the default)thePort - The port (or null to disable proxying, as is the default)void setProxyCredentials(String theUsername, String thePassword)
theUsername - The usernamethePassword - The password@Deprecated void setServerValidationModeEnum(ServerValidationModeEnum theServerValidationMode)
setServerValidationMode(ServerValidationModeEnum) instead. This method was incorrectly named.void setServerValidationMode(ServerValidationModeEnum theServerValidationMode)
The default value for this setting is defined by DEFAULT_SERVER_VALIDATION_MODE
void setSocketTimeout(int theSocketTimeout)
The default value for this setting is defined by DEFAULT_SOCKET_TIMEOUT
void setPoolMaxTotal(int thePoolMaxTotal)
The default value for this setting is defined by DEFAULT_POOL_MAX
void setPoolMaxPerRoute(int thePoolMaxPerRoute)
The default value for this setting is defined by DEFAULT_POOL_MAX_PER_ROUTE
Copyright © 2014–2016 University Health Network. All rights reserved.