Class JavaNetHttpConnector
java.lang.Object
org.glassfish.jersey.jnh.connector.JavaNetHttpConnector
- All Implemented Interfaces:
Connector,Inflector<ClientRequest,ClientResponse>
Provides a Jersey client
Connector, which internally uses Java's HttpClient.
The following properties are provided to Java's HttpClient.Builder during creation of the HttpClient:
- Author:
- Steffen Nießing
-
Constructor Summary
ConstructorsConstructorDescriptionJavaNetHttpConnector(Client client, Configuration configuration) Constructs a newConnectorfor a Jersey client instance using Java'sHttpClient. -
Method Summary
Modifier and TypeMethodDescriptionapply(ClientRequest request) Future<?>apply(ClientRequest request, AsyncConnectorCallback callback) voidclose()Returns the underlyingHttpClientinstance used by this connector.getName()
-
Constructor Details
-
JavaNetHttpConnector
Constructs a newConnectorfor a Jersey client instance using Java'sHttpClient.- Parameters:
client- a Jersey client instance to get additional configuration properties from (e.g.SSLContext)configuration- the configuration properties for this connector
-
-
Method Details
-
getHttpClient
Returns the underlyingHttpClientinstance used by this connector.- Returns:
- the Java
HttpClientinstance
-
apply
- Specified by:
applyin interfaceConnector- Specified by:
applyin interfaceInflector<ClientRequest,ClientResponse>
-
apply
-
getName
-
close
public void close() -
getCookieHandler
-