public ParameterisedAddress(String address) { int index = address.indexOf('?'); if (index == -1) { this.address = SimpleString.toSimpleString(address); this.queueAttributes = null; } else { this.address = SimpleString.toSimpleString(address.substring(0, index)); QueueAttributes queueAttributes = new QueueAttributes(); try { parseQuery(address).forEach(queueAttributes::set); } catch (URISyntaxException use) { throw new IllegalArgumentException("Malformed parameters in address " + address); } this.queueAttributes = queueAttributes; } }
rc.path = stripPrefix(params.substring(0, p), "/"); rc.parameters = parseQuery(params.substring(p + 1)); } else { if (params.length() > 0) {
/** * Given a URI parse and extract any URI query options and return them as a Key / Value mapping. * * This method differs from the {@link parseQuery} method in that it handles composite URI types and * will extract the URI options from the outermost composite URI. * * @param uri The URI whose query should be extracted and processed. * @return A Mapping of the URI options. * @throws java.net.URISyntaxException */ public static Map<String, String> parseParameters(URI uri) throws URISyntaxException { if (!isCompositeURI(uri)) { return uri.getQuery() == null ? emptyMap() : parseQuery(stripPrefix(uri.getQuery(), "?")); } else { CompositeData data = URISupport.parseComposite(uri); Map<String, String> parameters = new HashMap<>(); parameters.putAll(data.getParameters()); if (parameters.isEmpty()) { parameters = emptyMap(); } return parameters; } }
public ParameterisedAddress(String address) { int index = address.indexOf('?'); if (index == -1) { this.address = SimpleString.toSimpleString(address); this.queueAttributes = null; } else { this.address = SimpleString.toSimpleString(address.substring(0, index)); QueueAttributes queueAttributes = new QueueAttributes(); try { parseQuery(address).forEach(queueAttributes::set); } catch (URISyntaxException use) { throw new IllegalArgumentException("Malformed parameters in address " + address); } this.queueAttributes = queueAttributes; } }
public ParameterisedAddress(String address) { int index = address.indexOf('?'); if (index == -1) { this.address = SimpleString.toSimpleString(address); this.queueAttributes = null; } else { this.address = SimpleString.toSimpleString(address.substring(0, index)); QueueAttributes queueAttributes = new QueueAttributes(); try { parseQuery(address).forEach(queueAttributes::set); } catch (URISyntaxException use) { throw new IllegalArgumentException("Malformed parameters in address " + address); } this.queueAttributes = queueAttributes; } }
public ParameterisedAddress(String address) { int index = address.indexOf('?'); if (index == -1) { this.address = SimpleString.toSimpleString(address); this.queueAttributes = null; } else { this.address = SimpleString.toSimpleString(address.substring(0, index)); QueueAttributes queueAttributes = new QueueAttributes(); try { parseQuery(address).forEach(queueAttributes::set); } catch (URISyntaxException use) { throw new IllegalArgumentException("Malformed parameters in address " + address); } this.queueAttributes = queueAttributes; } }
public ParameterisedAddress(String address) { int index = address.indexOf('?'); if (index == -1) { this.address = SimpleString.toSimpleString(address); this.queueAttributes = null; } else { this.address = SimpleString.toSimpleString(address.substring(0, index)); QueueAttributes queueAttributes = new QueueAttributes(); try { parseQuery(address).forEach(queueAttributes::set); } catch (URISyntaxException use) { throw new IllegalArgumentException("Malformed parameters in address " + address); } this.queueAttributes = queueAttributes; } }
public ParameterisedAddress(String address) { int index = address.indexOf('?'); if (index == -1) { this.address = SimpleString.toSimpleString(address); this.queueAttributes = null; } else { this.address = SimpleString.toSimpleString(address.substring(0, index)); QueueAttributes queueAttributes = new QueueAttributes(); try { parseQuery(address).forEach(queueAttributes::set); } catch (URISyntaxException use) { throw new IllegalArgumentException("Malformed parameters in address " + address); } this.queueAttributes = queueAttributes; } }
public ParameterisedAddress(String address) { int index = address.indexOf('?'); if (index == -1) { this.address = SimpleString.toSimpleString(address); this.queueAttributes = null; } else { this.address = SimpleString.toSimpleString(address.substring(0, index)); QueueAttributes queueAttributes = new QueueAttributes(); try { parseQuery(address).forEach(queueAttributes::set); } catch (URISyntaxException use) { throw new IllegalArgumentException("Malformed parameters in address " + address); } this.queueAttributes = queueAttributes; } }
rc.path = stripPrefix(params.substring(0, p), "/"); rc.parameters = parseQuery(params.substring(p + 1)); } else { if (params.length() > 0) {
rc.path = stripPrefix(params.substring(0, p), "/"); rc.parameters = parseQuery(params.substring(p + 1)); } else { if (params.length() > 0) {
rc.path = stripPrefix(params.substring(0, p), "/"); rc.parameters = parseQuery(params.substring(p + 1)); } else { if (params.length() > 0) {
rc.path = stripPrefix(params.substring(0, p), "/"); rc.parameters = parseQuery(params.substring(p + 1)); } else { if (params.length() > 0) {
rc.path = stripPrefix(params.substring(0, p), "/"); rc.parameters = parseQuery(params.substring(p + 1)); } else { if (params.length() > 0) {
/** * Given a URI parse and extract any URI query options and return them as a Key / Value mapping. * * This method differs from the {@link parseQuery} method in that it handles composite URI types and * will extract the URI options from the outermost composite URI. * * @param uri The URI whose query should be extracted and processed. * @return A Mapping of the URI options. * @throws java.net.URISyntaxException */ public static Map<String, String> parseParameters(URI uri) throws URISyntaxException { if (!isCompositeURI(uri)) { return uri.getQuery() == null ? emptyMap() : parseQuery(stripPrefix(uri.getQuery(), "?")); } else { CompositeData data = URISupport.parseComposite(uri); Map<String, String> parameters = new HashMap<>(); parameters.putAll(data.getParameters()); if (parameters.isEmpty()) { parameters = emptyMap(); } return parameters; } }
/** * Given a URI parse and extract any URI query options and return them as a Key / Value mapping. * * This method differs from the {@link parseQuery} method in that it handles composite URI types and * will extract the URI options from the outermost composite URI. * * @param uri The URI whose query should be extracted and processed. * @return A Mapping of the URI options. * @throws java.net.URISyntaxException */ public static Map<String, String> parseParameters(URI uri) throws URISyntaxException { if (!isCompositeURI(uri)) { return uri.getQuery() == null ? emptyMap() : parseQuery(stripPrefix(uri.getQuery(), "?")); } else { CompositeData data = URISupport.parseComposite(uri); Map<String, String> parameters = new HashMap<>(); parameters.putAll(data.getParameters()); if (parameters.isEmpty()) { parameters = emptyMap(); } return parameters; } }
/** * Given a URI parse and extract any URI query options and return them as a Key / Value mapping. * * This method differs from the {@link parseQuery} method in that it handles composite URI types and * will extract the URI options from the outermost composite URI. * * @param uri The URI whose query should be extracted and processed. * @return A Mapping of the URI options. * @throws java.net.URISyntaxException */ public static Map<String, String> parseParameters(URI uri) throws URISyntaxException { if (!isCompositeURI(uri)) { return uri.getQuery() == null ? emptyMap() : parseQuery(stripPrefix(uri.getQuery(), "?")); } else { CompositeData data = URISupport.parseComposite(uri); Map<String, String> parameters = new HashMap<>(); parameters.putAll(data.getParameters()); if (parameters.isEmpty()) { parameters = emptyMap(); } return parameters; } }
/** * Given a URI parse and extract any URI query options and return them as a Key / Value mapping. * * This method differs from the {@link parseQuery} method in that it handles composite URI types and * will extract the URI options from the outermost composite URI. * * @param uri The URI whose query should be extracted and processed. * @return A Mapping of the URI options. * @throws java.net.URISyntaxException */ public static Map<String, String> parseParameters(URI uri) throws URISyntaxException { if (!isCompositeURI(uri)) { return uri.getQuery() == null ? emptyMap() : parseQuery(stripPrefix(uri.getQuery(), "?")); } else { CompositeData data = URISupport.parseComposite(uri); Map<String, String> parameters = new HashMap<>(); parameters.putAll(data.getParameters()); if (parameters.isEmpty()) { parameters = emptyMap(); } return parameters; } }
/** * Given a URI parse and extract any URI query options and return them as a Key / Value mapping. * * This method differs from the {@link parseQuery} method in that it handles composite URI types and * will extract the URI options from the outermost composite URI. * * @param uri The URI whose query should be extracted and processed. * @return A Mapping of the URI options. * @throws java.net.URISyntaxException */ public static Map<String, String> parseParameters(URI uri) throws URISyntaxException { if (!isCompositeURI(uri)) { return uri.getQuery() == null ? emptyMap() : parseQuery(stripPrefix(uri.getQuery(), "?")); } else { CompositeData data = URISupport.parseComposite(uri); Map<String, String> parameters = new HashMap<>(); parameters.putAll(data.getParameters()); if (parameters.isEmpty()) { parameters = emptyMap(); } return parameters; } }
/** * Given a URI parse and extract any URI query options and return them as a Key / Value mapping. * * This method differs from the {@link parseQuery} method in that it handles composite URI types and * will extract the URI options from the outermost composite URI. * * @param uri The URI whose query should be extracted and processed. * @return A Mapping of the URI options. * @throws java.net.URISyntaxException */ public static Map<String, String> parseParameters(URI uri) throws URISyntaxException { if (!isCompositeURI(uri)) { return uri.getQuery() == null ? emptyMap() : parseQuery(stripPrefix(uri.getQuery(), "?")); } else { CompositeData data = URISupport.parseComposite(uri); Map<String, String> parameters = new HashMap<>(); parameters.putAll(data.getParameters()); if (parameters.isEmpty()) { parameters = emptyMap(); } return parameters; } }