public class CachingConnectorProvider extends Object implements ConnectorProvider
Note however that the connector instance will be configured using the runtime configuration of the first client instance that
has invoked the
getConnector(jakarta.ws.rs.client.Client, jakarta.ws.rs.core.Configuration) method.
Configuration instance passed to subsequent
getConnector(...) invocations will be ignored. As such, this connector provider should not be shared among client
instances that have significantly different connector-specific settings.
|Constructor and Description|
Create the caching connector provider.
|Modifier and Type||Method and Description|
Get a Jersey client connector instance for a given
public CachingConnectorProvider(ConnectorProvider delegate)
delegate- delegate connector provider that will be used to initialize and create the connector instance which will be subsequently cached and reused.
public Connector getConnector(jakarta.ws.rs.client.Client client, jakarta.ws.rs.core.Configuration runtimeConfig)
clientinstance and Jersey client runtime
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.
SSL context or
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.
client- Jersey client instance.
runtimeConfig- Jersey client runtime configuration.
Connectorinstance to be used by the client.
Copyright © 2007-2021, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.