public final class LoopBackConnectorProvider extends Object implements ConnectorProvider
connector provider
used for testing/benchmarking
purposes. The provided connector is LoopBackConnector
returns a response that
contains the same data (headers, entity) as the processed request.Constructor and Description |
---|
LoopBackConnectorProvider() |
Modifier and Type | Method and Description |
---|---|
static javax.ws.rs.core.Configuration |
getClientConfig()
Get a client configuration specific to the connector.
|
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 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.public static javax.ws.rs.core.Configuration getClientConfig()
Copyright © 2007-2015, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.