public class JdkConnectorProvider extends Object implements ConnectorProvider
Modifier and Type | Field and Description |
---|---|
static String |
CONNECTION_IDLE_TIMEOUT
An amount of time in milliseconds (
Integer value) during which an idle connection will be kept open. |
static String |
CONTAINER_IDLE_TIMEOUT
Container idle timeout in milliseconds (
Integer value). |
static String |
COOKIE_POLICY
To set the cookie policy of this cookie manager.
|
static String |
MAX_CONNECTIONS_PER_DESTINATION
A maximal number of open connection to each destination.
|
static String |
MAX_HEADER_SIZE
A configurable property of HTTP parser.
|
static String |
MAX_REDIRECTS
The maximal number of redirects during single request.
|
static String |
WORKER_THREAD_POOL_CONFIG
Configuration of the connector thread pool.
|
Constructor and Description |
---|
JdkConnectorProvider() |
Modifier and Type | Method and Description |
---|---|
Connector |
getConnector(javax.ws.rs.client.Client client,
javax.ws.rs.core.Configuration config)
Get a Jersey client connector instance for a given
client instance
and Jersey client runtime configuration . |
public static final String WORKER_THREAD_POOL_CONFIG
ThreadPoolConfig
is expected.public static final String CONTAINER_IDLE_TIMEOUT
Integer
value).
When the timeout elapses, the shared thread pool will be destroyed.
The default value is public static final String MAX_HEADER_SIZE
public static final String MAX_REDIRECTS
Integer
. Default value is .
HTTP redirection must be enabled by property ClientProperties.FOLLOW_REDIRECTS
,
otherwise MAX_HEADER_SIZE
is not applied.public static final String COOKIE_POLICY
CookieManager
,
Constant Field Valuespublic static final String MAX_CONNECTIONS_PER_DESTINATION
public static final String CONNECTION_IDLE_TIMEOUT
Integer
value) during which an idle connection will be kept open.
The default value is public Connector getConnector(javax.ws.rs.client.Client client, javax.ws.rs.core.Configuration config)
ConnectorProvider
client
instance
and Jersey client runtime configuration
.
Note that the supplied runtime configuration can be different from the client instance
configuration as a single client can be used to serve multiple differently configured runtimes.
While the SSL context
or hostname verifier
are shared, other configuration properties may change in each runtime.
Based on the supplied client and runtime configuration data, it is up to each connector provider implementation to decide whether a new dedicated connector instance is required or if the existing, previously create connector instance can be reused.
getConnector
in interface ConnectorProvider
client
- Jersey client instance.config
- Jersey client runtime configuration.Connector
instance to be used by the client.Copyright © 2007-2015, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.