Class DefaultConnectionFactory
java.lang.Object
com.google.api.client.http.javanet.DefaultConnectionFactory
- All Implemented Interfaces:
ConnectionFactory
Default implementation of
ConnectionFactory
, which simply attempts to open the connection
with an optional Proxy
.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionopenConnection
(URL url) Creates a newHttpURLConnection
from the givenurl
.
-
Field Details
-
proxy
-
-
Constructor Details
-
DefaultConnectionFactory
public DefaultConnectionFactory() -
DefaultConnectionFactory
- Parameters:
proxy
- HTTP proxy ornull
to use the proxy settings from system properties
-
-
Method Details
-
openConnection
Description copied from interface:ConnectionFactory
Creates a newHttpURLConnection
from the givenurl
.- Specified by:
openConnection
in interfaceConnectionFactory
- 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:
IOException
- if there was a problem producing the connection
-