Codota Logo
URISupport
Code IndexAdd Codota to your IDE (free)

How to use
URISupport
in
org.apache.servicemix.common.util

Best Java code snippets using org.apache.servicemix.common.util.URISupport (Showing top 11 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: org.apache.servicemix/servicemix-common

public static Map parseParamters(URI uri) throws URISyntaxException {
  return uri.getQuery() == null ? Collections.EMPTY_MAP : parseQuery(stripPrefix(uri.getQuery(), "?"));
}
origin: org.apache.servicemix/servicemix-common

/**
 * <p>
 * Creates a URI from the original URI and the remaining paramaters.
 * </p>
 *
 * @param originalURI the original URI to populate.
 * @param params the params map to add in the URI.
 * @return the populated URI.
 */
public static URI createRemainingURI(URI originalURI, Map params) throws URISyntaxException {
  String s = createQueryString(params);
  if (s.length() == 0) {
    s = null;
  }
  return createURIWithQuery(originalURI, s);
}
origin: org.apache.servicemix/servicemix-ftp

protected Endpoint getResolvedEPR(ServiceEndpoint ep) throws Exception {
  FtpSenderEndpoint ftpEndpoint = new FtpSenderEndpoint(this, ep);
  URI uri = new URI(ep.getEndpointName());
  Map map = URISupport.parseQuery(uri.getQuery());
  IntrospectionSupport.setProperties(ftpEndpoint, map);
  ftpEndpoint.setUri(uri);
  ftpEndpoint.validate();
  return ftpEndpoint;
}
origin: org.apache.servicemix/servicemix-jms

protected Endpoint getResolvedEPR(ServiceEndpoint ep) throws Exception {
  // We receive an exchange for an EPR that has not been used yet.
  // Register a provider endpoint and restart processing.
  JmsEndpoint jmsEp = new JmsEndpoint(true);
  jmsEp.setServiceUnit(new DefaultServiceUnit(component));
  jmsEp.setService(ep.getServiceName());
  jmsEp.setEndpoint(ep.getEndpointName());
  jmsEp.setRole(MessageExchange.Role.PROVIDER);
  URI uri = new URI(ep.getEndpointName());
  Map map = URISupport.parseQuery(uri.getQuery());
  if (IntrospectionSupport.setProperties(jmsEp, map, "jms.")) {
    uri = URISupport.createRemainingURI(uri, map);
  }
  if (uri.getPath() != null) {
    String path = uri.getSchemeSpecificPart();
    while (path.startsWith("/")) {
      path = path.substring(1);
    }
    if (path.startsWith(AbstractJmsProcessor.STYLE_QUEUE + "/")) {
      jmsEp.setDestinationStyle(AbstractJmsProcessor.STYLE_QUEUE);
      jmsEp.setJmsProviderDestinationName(path.substring(AbstractJmsProcessor.STYLE_QUEUE.length() + 1));
    } else if (path.startsWith(AbstractJmsProcessor.STYLE_TOPIC + "/")) {
      jmsEp.setDestinationStyle(AbstractJmsProcessor.STYLE_TOPIC);
      jmsEp.setJmsProviderDestinationName(path.substring(AbstractJmsProcessor.STYLE_TOPIC.length() + 1));
    }
  }
  return jmsEp;
}
origin: org.apache.servicemix/servicemix-common

String params;
if (!checkParenthesis(ssp)) {
  throw new URISyntaxException(uri.toString(), "Not a matching number of '(' and ')' parenthesis");
String components[] = splitComponents(componentString);
rc.components = new URI[components.length];
for (int i = 0; i < components.length; i++) {
if (p >= 0) {
  if (p > 0) {
    rc.path = stripPrefix(params.substring(0, p), "/");
  rc.parameters = parseQuery(params.substring(p + 1));
} else {
  if (params.length() > 0) {
    rc.path = stripPrefix(params, "/");
origin: org.apache.servicemix/servicemix-common

/**
 * <p>
 * Removes any URI query from the given URI.
 * </p>
 *
 * @param uri the given URI.
 * @return a clean URI with removed any URI query.
 */
public static URI removeQuery(URI uri) throws URISyntaxException {
  return createURIWithQuery(uri, null);
}
origin: org.apache.servicemix/servicemix-common

sb.append(createQueryString(parameters));
origin: org.apache.servicemix/servicemix-file

Map map = URISupport.parseQuery(uri.getQuery());
IntrospectionSupport.setProperties(fileEp, map);
origin: org.apache.servicemix/servicemix-http

protected Endpoint getResolvedEPR(ServiceEndpoint ep) throws Exception {
  // We receive an exchange for an EPR that has not been used yet.
  // Register a provider endpoint and restart processing.
  HttpEndpoint httpEp = new HttpEndpoint(true);
  httpEp.setServiceUnit(new DefaultServiceUnit(component));
  httpEp.setService(ep.getServiceName());
  httpEp.setEndpoint(ep.getEndpointName());
  httpEp.setRole(MessageExchange.Role.PROVIDER);
  URI uri = new URI(ep.getEndpointName());
  Map map = URISupport.parseQuery(uri.getQuery());
  if (IntrospectionSupport.setProperties(httpEp, map, "http.")) {
    uri = URISupport.createRemainingURI(uri, map);
  }
  if (httpEp.getLocationURI() == null) {
    httpEp.setLocationURI(uri.toString());
  }
  return httpEp;
}
origin: org.apache.servicemix/servicemix-camel

@SuppressWarnings("unchecked")
public CamelProviderEndpoint createEndpoint(String uriString, JbiComponent jbiComponent) throws URISyntaxException {
  URI uri = new URI(uriString);
  Map map = URISupport.parseQuery(uri.getQuery());
  String camelUri = uri.getSchemeSpecificPart();
  Endpoint camelEndpoint = jbiComponent.getCamelContext().getEndpoint(camelUri);
  AsyncProcessor processor = jbiComponent.createCamelProcessor(camelEndpoint);        
  CamelProviderEndpoint endpoint =
    new CamelProviderEndpoint(getServiceUnit(), camelEndpoint,
                 jbiComponent.createBinding(camelEndpoint), processor);
  IntrospectionSupport.setProperties(endpoint, map);
  return endpoint;
}
origin: org.apache.servicemix/servicemix-bean

protected Endpoint getResolvedEPR(ServiceEndpoint ep) throws Exception {
  // We receive an exchange for an EPR that has not been used yet.
  // Register a provider endpoint and restart processing.
  BeanEndpoint endpoint = new BeanEndpoint(this, ep);
  // TODO
  //endpoint.setRole(MessageExchange.Role.PROVIDER);
  // lets use a URL to parse the path
  URI uri = new URI(ep.getEndpointName());
  String beanName = null;
  // lets try the host first for hierarchial URIs
  if (uri.getHost() != null) {
    // it must start bean://host/path
    beanName = uri.getHost();
  } else {
    // it must be an absolute URI of the form bean:name
    beanName = uri.getSchemeSpecificPart();
  }
  if (beanName != null) {
    endpoint.setBeanName(beanName);
  } else {
    throw new IllegalArgumentException("No bean name defined for URI: "
        + uri + ". Please use a URI of bean:name or bean://name?property=value");
  }
  Map map = URISupport.parseQuery(uri.getQuery());
  if (endpoint.getBean() == null) {
    endpoint.setBean(endpoint.createBean());
  }
  IntrospectionSupport.setProperties(endpoint.getBean(), map);
  return endpoint;
}
org.apache.servicemix.common.utilURISupport

Most used methods

  • parseQuery
  • createRemainingURI
    Creates a URI from the original URI and the remaining paramaters.
  • checkParenthesis
  • createQueryString
  • createURIWithQuery
    Creates a URI with the given query.
  • parseComposite
  • splitComponents
  • stripPrefix

Popular in Java

  • Start an intent from android
  • getResourceAsStream (ClassLoader)
  • startActivity (Activity)
  • runOnUiThread (Activity)
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • BitSet (java.util)
    This class implements a vector of bits that grows as needed. Each component of the bit set has a boo
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registery of org.quartz
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now