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