public class DefaultConnectionFactory extends Object implements ConnectionFactory
ConnectionFactory
, which simply attempts to open the connection
with an optional Proxy
.Constructor and Description |
---|
DefaultConnectionFactory() |
DefaultConnectionFactory(Proxy proxy) |
Modifier and Type | Method and 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
ConnectionFactory
HttpURLConnection
from the given url
.openConnection
in interface ConnectionFactory
url
- the URL to which the connection will be madeIOException
- if there was a problem producing the connectionCopyright © 2011–2022 Google. All rights reserved.