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 newHttpURLConnectionfrom the givenurl.
-
Field Details
-
proxy
-
-
Constructor Details
-
DefaultConnectionFactory
public DefaultConnectionFactory() -
DefaultConnectionFactory
- Parameters:
proxy- HTTP proxy ornullto use the proxy settings from system properties
-
-
Method Details
-
openConnection
Description copied from interface:ConnectionFactoryCreates a newHttpURLConnectionfrom the givenurl.- Specified by:
openConnectionin interfaceConnectionFactory- Parameters:
url- the URL to which the connection 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
-