Class JavaNetHttpConnectorProvider
java.lang.Object
org.glassfish.jersey.jnh.connector.JavaNetHttpConnectorProvider
- All Implemented Interfaces:
- ConnectorProvider
A provider class for a Jersey client 
Connector using Java's HttpClient.
 The following configuration properties are available:
- Author:
- Steffen Nießing
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetConnector(Client client, Configuration runtimeConfig) Get a Jersey client connector instance for a givenclientinstance and Jersey client runtimeconfiguration.static HttpClientgetHttpClient(Configurable<?> component) Retrieve the JavaHttpClientused by the providedJavaNetHttpConnector.
- 
Constructor Details- 
JavaNetHttpConnectorProviderpublic JavaNetHttpConnectorProvider()
 
- 
- 
Method Details- 
getConnectorDescription copied from interface:ConnectorProviderGet a Jersey client connector instance for a givenclientinstance and Jersey client runtimeconfiguration.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 contextorhostname verifierare 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. - Specified by:
- getConnectorin interface- ConnectorProvider
- Parameters:
- client- Jersey client instance.
- runtimeConfig- Jersey client runtime configuration.
- Returns:
- configured Connectorinstance to be used by the client.
 
- 
getHttpClientRetrieve the JavaHttpClientused by the providedJavaNetHttpConnector.- Parameters:
- component- the component from which the- JavaNetHttpConnectorshould be retrieved
- Returns:
- a Java HttpClientinstance
- Throws:
- IllegalArgumentException- if a- JavaNetHttpConnectorcannot be provided from the given- component
 
 
-