@Test public void testParseCompositeWithInnerURIsWithQueryValues() throws Exception { URI uri = new URI("failover: CompositeData data = URISupport.parseComposite(uri); assertEquals(3, data.getComponents().size()); Map<String, String> parameters = data.getParameters(); assertEquals(1, parameters.size()); assertTrue(parameters.containsKey("failover.useReconnectBackOff")); assertTrue(parameters.get("failover.useReconnectBackOff").equals("false")); List<URI> uris = data.getComponents(); assertEquals(uris.get(0).toString(), "amqp: assertEquals(uris.get(1).toString(), "amqp: assertEquals(uris.get(2).toString(), "amqp: }
public static CompositeData parseComposite(URI uri) throws URISyntaxException { CompositeData rc = new CompositeData(); rc.scheme = uri.getScheme(); String ssp = PropertyUtil.stripPrefix(uri.getRawSchemeSpecificPart().trim(), " try { parseComposite(uri, rc, ssp); } catch (Exception e) { throw new URISyntaxException(uri.toString(), e.getMessage()); } rc.fragment = uri.getFragment(); return rc; }
URISupport { public static CompositeData parseComposite(URI uri) throws URISyntaxException { CompositeData rc = new CompositeData(); rc.scheme = uri.getScheme(); String ssp = PropertyUtil.stripPrefix(uri.getRawSchemeSpecificPart().trim(), " try { parseComposite(uri, rc, ssp); } catch (Exception e) { throw new URISyntaxException(uri.toString(), e.getMessage()); } rc.fragment = uri.getFragment(); return rc; } }
URISupport { public static CompositeData parseComposite(URI uri) throws URISyntaxException { CompositeData rc = new CompositeData(); rc.scheme = uri.getScheme(); String ssp = PropertyUtil.stripPrefix(uri.getRawSchemeSpecificPart().trim(), " try { parseComposite(uri, rc, ssp); } catch (Exception e) { throw new URISyntaxException(uri.toString(), e.getMessage()); } rc.fragment = uri.getFragment(); return rc; }  }
URISupport { public static CompositeData parseComposite(URI uri) throws URISyntaxException { CompositeData rc = new CompositeData(); rc.scheme = uri.getScheme(); String ssp = PropertyUtil.stripPrefix(uri.getRawSchemeSpecificPart().trim(), " try { parseComposite(uri, rc, ssp); } catch (Exception e) { throw new URISyntaxException(uri.toString(), e.getMessage()); } rc.fragment = uri.getFragment(); return rc; }  static CompositeData parseComposite(URI uri); static boolean isCompositeURI(URI uri); static boolean checkParenthesis(String str); static int indexOfParenthesisMatch(String str, int first); static String[] splitComponents(String str); static URI removeQuery(URI uri); static Map<String, String> parseParameters(URI uri); static URI applyParameters(URI uri, Map<String, String> queryParameters); static URI applyParameters(URI uri, Map<String, String> queryParameters, String optionPrefix); }
URISupport { public static CompositeData parseComposite(URI uri) throws URISyntaxException { CompositeData rc = new CompositeData(); rc.scheme = uri.getScheme(); String ssp = PropertyUtil.stripPrefix(uri.getRawSchemeSpecificPart().trim(), " try { parseComposite(uri, rc, ssp); } catch (Exception e) { throw new URISyntaxException(uri.toString(), e.getMessage()); } rc.fragment = uri.getFragment(); return rc; }  static CompositeData parseComposite(URI uri); static boolean isCompositeURI(URI uri); static boolean checkParenthesis(String str); static int indexOfParenthesisMatch(String str, int first); static String[] splitComponents(String str); static URI removeQuery(URI uri); static Map<String, String> parseParameters(URI uri); static URI applyParameters(URI uri, Map<String, String> queryParameters); static URI applyParameters(URI uri, Map<String, String> queryParameters, String optionPrefix);  }