Class DefaultHttpUrlConnectionFactory
java.lang.Object
org.dmfs.httpessentials.httpurlconnection.factories.DefaultHttpUrlConnectionFactory
- All Implemented Interfaces:
HttpUrlConnectionFactory
public final class DefaultHttpUrlConnectionFactory
extends Object
implements HttpUrlConnectionFactory
A trivial
HttpUrlConnectionFactory. It merely opens the given connection and performs no other configuration. You may decorate this to do some more
advanced configuration.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionhttpUrlConnection(URI uri) Returns anHttpURLConnectionto the given Uri.
-
Constructor Details
-
DefaultHttpUrlConnectionFactory
public DefaultHttpUrlConnectionFactory()
-
-
Method Details
-
httpUrlConnection
Description copied from interface:HttpUrlConnectionFactoryReturns anHttpURLConnectionto the given Uri.- Specified by:
httpUrlConnectionin interfaceHttpUrlConnectionFactory- Parameters:
uri- The uri to connect to. This must be an absolute URL.- Returns:
- An
HttpURLConnection. - Throws:
IllegalArgumentException- if the given URI was not a valid absolute URL.IOException
-