Class UrlFactory
- java.lang.Object
-
- org.opennms.protocols.xml.collector.UrlFactory
-
public class UrlFactory extends Object
A factory for creating URL objects.- Author:
- Alejandro Galue
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voiddisconnect(URLConnection connection)Disconnect.static URLgetUrl(String urlStr, Request request)Gets the URL Object.
-
-
-
Method Detail
-
getUrl
public static URL getUrl(String urlStr, Request request) throws MalformedURLException
Gets the URL Object.This method has been created because it is not possible to call URL.setURLStreamHandlerFactory more than once.
- Parameters:
urlStr- the URL Stringrequest- the request- Returns:
- the URL Object
- Throws:
MalformedURLException- the malformed URL exception
-
disconnect
public static void disconnect(URLConnection connection)
Disconnect.- Parameters:
connection- the URL connection
-
-