private static class HttpUrlConnectorProvider.DefaultConnectionFactory extends java.lang.Object implements HttpUrlConnectorProvider.ConnectionFactory
Modifier | Constructor and Description |
---|---|
private |
DefaultConnectionFactory() |
Modifier and Type | Method and Description |
---|---|
java.net.HttpURLConnection |
getConnection(java.net.URL url)
Get a
HttpURLConnection for a given URL. |
public java.net.HttpURLConnection getConnection(java.net.URL url) throws java.io.IOException
HttpUrlConnectorProvider.ConnectionFactory
HttpURLConnection
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.
getConnection
in interface HttpUrlConnectorProvider.ConnectionFactory
url
- the endpoint URL.HttpURLConnection
.java.io.IOException
- in case the connection cannot be provided.