Class JavaNetHttpConnectorProvider
- java.lang.Object
-
- org.glassfish.jersey.jnh.connector.JavaNetHttpConnectorProvider
-
- All Implemented Interfaces:
ConnectorProvider
public class JavaNetHttpConnectorProvider extends Object implements ConnectorProvider
A provider class for a Jersey clientConnectorusing Java'sHttpClient.The following configuration properties are available:
- Author:
- Steffen Nießing
-
-
Constructor Summary
Constructors Constructor Description JavaNetHttpConnectorProvider()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectorgetConnector(Client client, Configuration runtimeConfig)static HttpClientgetHttpClient(Configurable<?> component)Retrieve the JavaHttpClientused by the providedJavaNetHttpConnector.
-
-
-
Method Detail
-
getConnector
public Connector getConnector(Client client, Configuration runtimeConfig)
- Specified by:
getConnectorin interfaceConnectorProvider
-
getHttpClient
public static HttpClient getHttpClient(Configurable<?> component)
Retrieve the JavaHttpClientused by the providedJavaNetHttpConnector.- Parameters:
component- the component from which theJavaNetHttpConnectorshould be retrieved- Returns:
- a Java
HttpClientinstance - Throws:
IllegalArgumentException- if aJavaNetHttpConnectorcannot be provided from the givencomponent
-
-