ConnectionFactorypublic class DefaultConnectionFactory extends Object implements ConnectionFactory
ConnectionFactory, which simply attempts to open the connection
with an optional Proxy.| Constructor | Description |
|---|---|
DefaultConnectionFactory() |
|
DefaultConnectionFactory(Proxy proxy) |
| Modifier and Type | Method | Description |
|---|---|---|
HttpURLConnection |
openConnection(URL url) |
Creates a new
HttpURLConnection from the given url. |
public DefaultConnectionFactory()
public DefaultConnectionFactory(Proxy proxy)
proxy - HTTP proxy or null to use the proxy settings from
system propertiespublic HttpURLConnection openConnection(URL url) throws IOException
ConnectionFactoryHttpURLConnection from the given url.openConnection in interface ConnectionFactoryurl - the URL to which the conneciton will be madeIOException - if there was a problem producing the connectionCopyright © 2011–2019 Google. All rights reserved.