@Test public void parse() throws HostParserException { final Host host = new HostParser(new ProtocolFactory(Collections.singleton(new TestProtocol(Scheme.https)))) .get("https: assertEquals("host", host.getHostname()); assertEquals(443, host.getPort()); assertEquals("t@u", host.getCredentials().getUsername()); assertEquals("/key", host.getDefaultPath()); }
public static Host parse(final String url) throws HostParserException { final Host parsed = new HostParser(ProtocolFactory.get(), ProtocolFactory.get().forName( preferences.getProperty("connection.protocol.default"))).get(url); if(log.isDebugEnabled()) { log.debug(String.format("Parsed %s as %s", url, parsed)); } return parsed; }
HostParser { public static Host parse(final String url) throws HostParserException { final Host parsed = new HostParser(ProtocolFactory.get(), ProtocolFactory.get().forName( preferences.getProperty("connection.protocol.default"))).get(url); if(log.isDebugEnabled()) { log.debug(String.format("Parsed %s as %s", url, parsed)); } return parsed; } }
HostParser { public static Host parse(final String url) throws HostParserException { final Host parsed = new HostParser(ProtocolFactory.get(), ProtocolFactory.get().forName( preferences.getProperty("connection.protocol.default"))).get(url); if(log.isDebugEnabled()) { log.debug(String.format("Parsed %s as %s", url, parsed)); } return parsed; } HostParser();  HostParser(final ProtocolFactory factory);  HostParser(final ProtocolFactory factory, final Protocol defaultScheme); }
HostParser { public static Host parse(final String url) throws HostParserException { final Host parsed = new HostParser(ProtocolFactory.get(), ProtocolFactory.get().forName( preferences.getProperty("connection.protocol.default"))).get(url); if(log.isDebugEnabled()) { log.debug(String.format("Parsed %s as %s", url, parsed)); } return parsed; } HostParser();  HostParser(final ProtocolFactory factory);  HostParser(final ProtocolFactory factory, final Protocol defaultScheme); Host get(final String url); static Host parse(final String url); }
HostParser { public static Host parse(final String url) throws HostParserException { final Host parsed = new HostParser(ProtocolFactory.get(), ProtocolFactory.get().forName( preferences.getProperty("connection.protocol.default"))).get(url); if(log.isDebugEnabled()) { log.debug(String.format("Parsed %s as %s", url, parsed)); } return parsed; } HostParser();  HostParser(final ProtocolFactory factory);  HostParser(final ProtocolFactory factory, final Protocol defaultScheme); Host get(final String url); static Host parse(final String url);  }