@Override protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> params) throws Exception { int idx = remaining.indexOf(':'); if (idx <= 0) { throw new IllegalArgumentException("Missing : in URI so can't split the group name from the actual URI for '" + remaining + "'"); } // we are registering a regular endpoint String name = remaining.substring(0, idx); String childUri = remaining.substring(idx + 1); // we need to apply the params here if (params != null && params.size() > 0) { childUri = childUri + "?" + URISupport.createQueryString(params); } return new MasterEndpoint(uri, this, name, childUri); }
@Override protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> params) throws Exception { int idx = remaining.indexOf(':'); if (idx <= 0) { throw new IllegalArgumentException("Missing : in URI so can't split the group name from the actual URI for '" + remaining + "'"); } // we are registering a regular endpoint String name = remaining.substring(0, idx); String childUri = remaining.substring(idx + 1); // we need to apply the params here if (params != null && params.size() > 0) { childUri = childUri + "?" + URISupport.createQueryString(params); } return new MasterEndpoint(uri, this, name, childUri); }
protected URI prepareCamelUri(String schema, String path, Map<String, Object> params) throws URISyntaxException { String url; if (schema == null) { url = path; } else { url = schema + "://" + path; } URI camelUri; try { camelUri = new URI(URISupport.normalizeUri(url)); } catch (UnsupportedEncodingException e) { camelUri = new URI(url); } if (params.isEmpty()) { return camelUri; } else { return URISupport.createURIWithQuery(camelUri, URISupport.createQueryString(params)); } }
@Override protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> params) throws Exception { int idx = remaining.indexOf(':'); if (idx > 0) { // we are registering a regular endpoint String name = remaining.substring(0, idx); // need to replace the "0.0.0.0" with the host and port String childUri = replaceAnyIpAddress(remaining.substring(idx + 1)); // we need to apply the params here if (params != null && params.size() > 0) { childUri = childUri + "?" + URISupport.createQueryString(params); } return new FabricPublisherEndpoint(uri, this, name, childUri); } else { return new FabricLocatorEndpoint(uri, this, remaining); } }
@Override @SuppressWarnings("unchecked") protected String convertPathToActualDestination(String path, Map<String, Object> parameters) { // support ActiveMQ destination options using the destination. prefix // http://activemq.apache.org/destination-options.html Map options = IntrospectionSupport.extractProperties(parameters, "destination."); String query; try { query = URISupport.createQueryString(options); } catch (URISyntaxException e) { throw ObjectHelper.wrapRuntimeCamelException(e); } // if we have destination options then append them to the destination name if (ObjectHelper.isNotEmpty(query)) { return path + "?" + query; } else { return path; } }
@Override protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> params) throws Exception { int idx = remaining.indexOf(':'); if (idx > 0) { // we are registering a regular endpoint String name = remaining.substring(0, idx); // need to replace the "0.0.0.0" with the host and port String childUri = replaceAnyIpAddress(remaining.substring(idx + 1)); // we need to apply the params here if (params != null && params.size() > 0) { childUri = childUri + "?" + URISupport.createQueryString(params); } return new FabricPublisherEndpoint(uri, this, name, childUri); } else { return new FabricLocatorEndpoint(uri, this, remaining); } }
protected URI prepareCamelUri(String schema, String path, Map<String, Object> params) throws URISyntaxException { String url; if (schema == null) { url = path; } else { url = schema + "://" + path; } URI camelUri; try { camelUri = new URI(URISupport.normalizeUri(url)); } catch (UnsupportedEncodingException e) { camelUri = new URI(url); } if (params.isEmpty()) { return camelUri; } else { return URISupport.createURIWithQuery(camelUri, URISupport.createQueryString(params)); } } }
@Override @SuppressWarnings("unchecked") protected String convertPathToActualDestination(String path, Map<String, Object> parameters) { // support ActiveMQ destination options using the destination. prefix // http://activemq.apache.org/destination-options.html Map options = IntrospectionSupport.extractProperties(parameters, "destination."); String query; try { query = URISupport.createQueryString(options); } catch (URISyntaxException e) { throw ObjectHelper.wrapRuntimeCamelException(e); } // if we have destination options then append them to the destination name if (ObjectHelper.isNotEmpty(query)) { return path + "?" + query; } else { return path; } }
Map<String, Object> properties = IntrospectionSupport.extractProperties(params, "consumer."); if (properties != null && properties.size() > 0) { consumer = consumer + "?" + URISupport.createQueryString(properties); for (String k : properties.keySet()) { params.remove(k); child = child + "?" + URISupport.createQueryString(params);
@Override public Processor createPreProcessor(Exchange exchange, DynamicAwareEntry entry) throws Exception { String[] hostAndPath = parseUri(entry); String path = hostAndPath[1]; String query = null; if (!entry.getLenientProperties().isEmpty()) { // all lenient properties can be dynamic and provided in the HTTP_QUERY header query = URISupport.createQueryString(new LinkedHashMap<>(entry.getLenientProperties())); } if (path != null || query != null) { return new HttpSendDynamicPreProcessor(path, query); } else { // no optimisation return null; } }
sorted.put(key, parameters.get(key)); String query = URISupport.createQueryString(sorted); result = scheme + "://" + path + "?" + query; this.createdUri = result;
params.remove("serialization"); String endpointUri = this.destinationUri + URISupport.createQueryString(params); this.setEndpointUri(endpointUri);
Map<String, Object> properties = IntrospectionSupport.extractProperties(params, "consumer."); if (properties != null && properties.size() > 0) { consumer = consumer + "?" + URISupport.createQueryString(properties); for (String k : properties.keySet()) { params.remove(k); child = child + "?" + URISupport.createQueryString(params);
String query = URISupport.createQueryString(map); if (!query.isEmpty()) { url = url + "?" + query;
String query = URISupport.createQueryString(map);
String query = URISupport.createQueryString(map); if (!query.isEmpty()) { url = url + "?" + query;
String query = URISupport.createQueryString(map); int port = 0;
String query = URISupport.createQueryString(map);
String query = URISupport.createQueryString(map);