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 SummaryConstructorsConstructorDescriptionJavaNetHttpConnector(Client client, Configuration configuration) Constructs a newConnectorfor a Jersey client instance using Java'sHttpClient.
- 
Method SummaryModifier and TypeMethodDescriptionapply(ClientRequest request) Synchronously process client request into a response.Future<?>apply(ClientRequest request, AsyncConnectorCallback callback) Asynchronously process client request into a response.voidclose()Close connector and release all it's internally associated resources.Returns the underlyingHttpClientinstance used by this connector.getName()Get name of current connector.
- 
Constructor Details- 
JavaNetHttpConnectorConstructs 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- 
getHttpClientReturns the underlyingHttpClientinstance used by this connector.- Returns:
- the Java HttpClientinstance
 
- 
applyDescription copied from interface:ConnectorSynchronously process client request into a response. The method is used by Jersey client runtime to synchronously send a request and receive a response.- Specified by:
- applyin interface- Connector
- Specified by:
- applyin interface- Inflector<ClientRequest,- ClientResponse> 
- Parameters:
- request- Jersey client request to be sent.
- Returns:
- Jersey client response received for the client request.
 
- 
applyDescription copied from interface:ConnectorAsynchronously process client request into a response. The method is used by Jersey client runtime to asynchronously send a request and receive a response.
- 
getNameDescription copied from interface:ConnectorGet name of current connector. Should contain identification of underlying specification and optionally version number. Will be used in User-Agent header.- Specified by:
- getNamein interface- Connector
- Returns:
- name of current connector. Returning nullor empty string means not including this information in a generated "User-Agent" header.
 
- 
closepublic void close()Description copied from interface:ConnectorClose connector and release all it's internally associated resources.
- 
getCookieHandler
 
-