@Test public void testAddURLConnection() { m_genericURLFactory.addURLConnection("myProtocol", "org.opennms.test.MyProtocolImplementation"); Assert.assertEquals("Test add URL connection", m_genericURLFactory.getURLConnections().get("myProtocol"), "org.opennms.test.MyProtocolImplementation"); }
public void addURLConnection(String protocol, String classname, int defaultPort) { urlConnections.put(protocol, classname); urlDefaultPorts.put(protocol, defaultPort); }
GenericURLFactory implements URLStreamHandlerFactory { public void addURLConnection(String protocol, String classname, int defaultPort) { urlConnections.put(protocol, classname); urlDefaultPorts.put(protocol, defaultPort); } }
GenericURLFactory implements URLStreamHandlerFactory { public void addURLConnection(String protocol, String classname, int defaultPort) { urlConnections.put(protocol, classname); urlDefaultPorts.put(protocol, defaultPort); } private  GenericURLFactory(); }
GenericURLFactory implements URLStreamHandlerFactory { public void addURLConnection(String protocol, String classname, int defaultPort) { urlConnections.put(protocol, classname); urlDefaultPorts.put(protocol, defaultPort); } private  GenericURLFactory(); static void initialize(); static GenericURLFactory getInstance(); void addURLConnection(String protocol, String classname, int defaultPort); void addURLConnection(String protocol, String classname); void removeURLConnection(String protocol); HashMap<String, String> getURLConnections(); @SuppressWarnings("unchecked") URLStreamHandler createURLStreamHandler(String protocol); }
GenericURLFactory implements URLStreamHandlerFactory { public void addURLConnection(String protocol, String classname, int defaultPort) { urlConnections.put(protocol, classname); urlDefaultPorts.put(protocol, defaultPort); } private  GenericURLFactory(); static void initialize(); static GenericURLFactory getInstance(); void addURLConnection(String protocol, String classname, int defaultPort); void addURLConnection(String protocol, String classname); void removeURLConnection(String protocol); HashMap<String, String> getURLConnections(); @SuppressWarnings("unchecked") URLStreamHandler createURLStreamHandler(String protocol);  }