Class Apache5ClientProperties
java.lang.Object
org.glassfish.jersey.apache5.connector.Apache5ClientProperties
Configuration options specific to the Client API that utilizes
Apache5ConnectorProvider
.- Author:
- jorgeluisw@mac.com, Paul Sandoz, Pavel Bucek, Arul Dhesiaseelan (aruld at acm.org), Steffen Nießing
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Strategy that closes the Apache Connection.static final String
Connection Manager which will be used to createHttpClient
.static final String
A value oftrue
indicates that configured connection manager should be shared among multiple JerseyClientRuntime
instances.static final String
The credential provider that should be used to retrieve credentials from a user.static final String
A value offalse
indicates the client should handle cookies automatically using HttpClient's default cookie policy.static final String
ConnectionKeepAliveStrategy for theHttpClient
.static final String
A value oftrue
indicates that a client should send an authentication request even before the server gives a 401 response.static final String
Request configuration for theHttpClient
.static final String
HttpRequestRetryStrategy which will be used to createHttpClient
.static final String
ConnectionReuseStrategy for theHttpClient
.static final String
A value offalse
indicates the client will use default ApacheConnector params. -
Method Summary
-
Field Details
-
CREDENTIALS_PROVIDER
The credential provider that should be used to retrieve credentials from a user. Credentials needed for proxy authentication are stored here as well. The value MUST be an instance ofCredentialsProvider
. If the property is absent a default provider will be used. The name of the configuration property is "jersey.config.apache5.client.credentialsProvider".- See Also:
-
DISABLE_COOKIES
A value offalse
indicates the client should handle cookies automatically using HttpClient's default cookie policy. A value oftrue
will cause the client to ignore all cookies. The value MUST be an instance ofBoolean
. The default value isfalse
. The name of the configuration property is "jersey.config.apache5.client.handleCookies".- See Also:
-
PREEMPTIVE_BASIC_AUTHENTICATION
A value oftrue
indicates that a client should send an authentication request even before the server gives a 401 response.This property may only be set prior to constructing Apache connector using
The value MUST be an instance ofApache5ConnectorProvider
.Boolean
. The default value isfalse
. The name of the configuration property is "jersey.config.apache5.client.preemptiveBasicAuthentication".- See Also:
-
CONNECTION_MANAGER
Connection Manager which will be used to createHttpClient
. The value MUST be an instance ofHttpClientConnectionManager
. If the property is absent a default Connection Manager will be used (BasicHttpClientConnectionManager
). If you want to use this client in multi-threaded environment, be sure you override default value withPoolingHttpClientConnectionManager
instance. The name of the configuration property is "jersey.config.apache5.client.connectionManager".- See Also:
-
CONNECTION_MANAGER_SHARED
A value oftrue
indicates that configured connection manager should be shared among multiple JerseyClientRuntime
instances. It means that closing a particularClientRuntime
instance does not shut down the underlying connection manager automatically. In such case, the connection manager life-cycle should be fully managed by the application code. To release all allocated resources, caller code should especially ensureCloseable.close()
gets invoked eventually.This property may only be set prior to constructing Apache connector using
The value MUST be an instance ofApache5ConnectorProvider
.Boolean
. The default value isfalse
. The name of the configuration property is "jersey.config.apache5.client.connectionManagerShared".- Since:
- 2.18
- See Also:
-
REQUEST_CONFIG
Request configuration for theHttpClient
. Http parameters which will be used to createHttpClient
. The value MUST be an instance ofRequestConfig
. If the property is absent default request configuration will be used. The name of the configuration property is "jersey.config.apache5.client.requestConfig".- Since:
- 2.5
- See Also:
-
RETRY_STRATEGY
HttpRequestRetryStrategy which will be used to createHttpClient
. The value MUST be an instance ofHttpRequestRetryStrategy
. If the property is absent a default retry handler will be used (DefaultHttpRequestRetryStrategy
). The name of the configuration property is "jersey.config.apache5.client.retryStrategy".- See Also:
-
REUSE_STRATEGY
ConnectionReuseStrategy for theHttpClient
. The value MUST be an instance ofConnectionReuseStrategy
. If the property is absent the default reuse strategy of the Apache HTTP library will be used The name of the configuration property is "jersey.config.apache5.client.reuseStrategy".- See Also:
-
KEEPALIVE_STRATEGY
ConnectionKeepAliveStrategy for theHttpClient
. The value MUST be an instance ofConnectionKeepAliveStrategy
. If the property is absent the default keepalive strategy of the Apache HTTP library will be used The name of the configuration property is "jersey.config.apache5.client.keepAliveStrategy".- See Also:
-
CONNECTION_CLOSING_STRATEGY
Strategy that closes the Apache Connection. Accepts an instance ofApache5ConnectionClosingStrategy
.- Since:
- 2.30
- See Also:
-
USE_SYSTEM_PROPERTIES
A value offalse
indicates the client will use default ApacheConnector params. A value oftrue
will cause the client to take into account the system propertieshttps.protocols
,https.cipherSuites
,http.keepAlive
,http.maxConnections
. The value MUST be an instance ofBoolean
. The default value isfalse
. The name of the configuration property is "jersey.config.apache5.client.useSystemProperties".- See Also:
-
-
Method Details
-
getValue
Get the value of the specified property. If the property is not set or the actual property value type is not compatible with the specified type, the method will returnnull
.- Type Parameters:
T
- Type of the property value.- Parameters:
properties
- Map of properties to get the property value from.key
- Name of the property.type
- Type to retrieve the value as.- Returns:
- Value of the property or
null
. - Since:
- 2.8
-