Package org.glassfish.jersey.client
Interface HttpUrlConnectorProvider.ConnectionFactory
-
- All Known Implementing Classes:
HttpUrlConnectorProvider.DefaultConnectionFactory
- Enclosing class:
- HttpUrlConnectorProvider
public static interface HttpUrlConnectorProvider.ConnectionFactory
A factory forHttpURLConnection
instances.A factory may be used to create a
HttpURLConnection
and configure it in a custom manner that is not possible using the Client API.A custom factory instance may be registered in the
HttpUrlConnectorProvider
instance viaHttpUrlConnectorProvider.connectionFactory(ConnectionFactory)
method.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.net.HttpURLConnection
getConnection(java.net.URL url)
Get aHttpURLConnection
for a given URL.
-
-
-
Method Detail
-
getConnection
java.net.HttpURLConnection getConnection(java.net.URL url) throws java.io.IOException
Get aHttpURLConnection
for a given URL.Implementation of the method MUST be thread-safe and MUST ensure that a dedicated
HttpURLConnection
instance is returned for concurrent requests.- Parameters:
url
- the endpoint URL.- Returns:
- the
HttpURLConnection
. - Throws:
java.io.IOException
- in case the connection cannot be provided.
-
-