Tabnine Logo
URISupport
Code IndexAdd Tabnine 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)

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

  • Making http requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • addToBackStack (FragmentTransaction)
  • onRequestPermissionsResult (Fragment)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • JButton (javax.swing)
  • JCheckBox (javax.swing)
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now