Interface ConnectionFactory
-
- All Known Implementing Classes:
DefaultConnectionFactory
public interface ConnectionFactory
Given aURL
instance, produces anHttpURLConnection
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.net.HttpURLConnection
openConnection(java.net.URL url)
Creates a newHttpURLConnection
from the givenurl
.
-
-
-
Method Detail
-
openConnection
java.net.HttpURLConnection openConnection(java.net.URL url) throws java.io.IOException, java.lang.ClassCastException
Creates a newHttpURLConnection
from the givenurl
.- Parameters:
url
- the URL to which the conneciton will be made- Returns:
- the created connection object, which will still be in the pre-connected state
- Throws:
java.io.IOException
- if there was a problem producing the connectionjava.lang.ClassCastException
- if the URL is not for an HTTP endpoint
-
-