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