Codota Logo
ComponentResolver.resolveComponent
Code IndexAdd Codota to your IDE (free)

How to use
resolveComponent
method
in
org.apache.camel.spi.ComponentResolver

Best Java code snippets using org.apache.camel.spi.ComponentResolver.resolveComponent (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: org.apache.camel/camel-core-osgi

protected Component getComponent(String name, CamelContext context) throws Exception {
  LOG.trace("Finding Component: {}", name);
  try {
    ServiceReference<?>[] refs = bundleContext.getServiceReferences(ComponentResolver.class.getName(), "(component=" + name + ")");
    if (refs != null) {
      for (ServiceReference<?> ref : refs) {
        Object service = bundleContext.getService(ref);
        if (ComponentResolver.class.isAssignableFrom(service.getClass())) {
          ComponentResolver resolver = (ComponentResolver) service;
          return resolver.resolveComponent(name, context);
        }
      }
    }
    return null;
  } catch (InvalidSyntaxException e) {
    throw ObjectHelper.wrapRuntimeCamelException(e);
  }
}
origin: wildfly-extras/wildfly-camel

  @Override
  public Component resolveComponent(String name, CamelContext context) throws Exception {
    Component component = null;
    Iterator<CamelSubsytemExtension> iterator = subsystemState.getCamelSubsytemExtensions().iterator();
    for (; iterator.hasNext() && component == null;) {
      CamelSubsytemExtension plugin = iterator.next();
      component = plugin.resolveComponent(name, subsystemState);
    }
    return component != null ? component : delegate.resolveComponent(name, context);
  }
}
origin: org.wildfly.camel/wildfly-camel-subsystem-core

  @Override
  public Component resolveComponent(String name, CamelContext context) throws Exception {
    Component component = null;
    Iterator<CamelSubsytemExtension> iterator = subsystemState.getCamelSubsytemExtensions().iterator();
    for (; iterator.hasNext() && component == null;) {
      CamelSubsytemExtension plugin = iterator.next();
      component = plugin.resolveComponent(name, subsystemState);
    }
    return component != null ? component : delegate.resolveComponent(name, context);
  }
}
origin: org.apache.camel/camel-blueprint

@Override
public Component resolveComponent(String name, CamelContext context) throws Exception {
  Component componentReg = ResolverHelper.lookupComponentInRegistryWithFallback(context, name, new ResolverHelper.LookupExceptionHandler() {
    @Override
    public void handleException(Exception e, Logger log, String name) {
      if (getException(NoSuchComponentException.class, e) != null) {
        // if the caused error is NoSuchComponentException then that can be expected so ignore
      } else if (getException(ComponentDefinitionException.class, e) != null) {
        LOG.warn("Problem looking up bean: " + name + " due: " + e.getMessage(), e);
      } else {
        LOG.trace("Ignored error looking up bean: " + name + " due: " + e.getMessage(), e);
      }
    }
  });
  if (componentReg != null) {
    return componentReg;
  }
  try {
    Object bean = context.getRegistry().lookupByName(".camelBlueprint.componentResolver." + name);
    if (bean instanceof ComponentResolver) {
      LOG.debug("Found component resolver: {} in registry: {}", name, bean);
      return ((ComponentResolver) bean).resolveComponent(name, context);
    }
  } catch (Exception e) {
    LOG.trace("Ignored error looking up bean: " + name + " due: " + e.getMessage(), e);
  }
  return getComponent(name, context);
}
org.apache.camel.spiComponentResolverresolveComponent

Popular methods of ComponentResolver

    Popular in Java

    • Creating JSON documents from java classes using gson
    • getExternalFilesDir (Context)
    • setRequestProperty (URLConnection)
      Sets the general request property. If a property with the key already exists, overwrite its value wi
    • notifyDataSetChanged (ArrayAdapter)
    • FileReader (java.io)
      A specialized Reader that reads from a file in the file system. All read requests made by calling me
    • URLConnection (java.net)
      The abstract class URLConnection is the superclass of all classes that represent a communications li
    • Connection (java.sql)
      A connection represents a link from a Java application to a database. All SQL statements and results
    • Iterator (java.util)
      An iterator over a collection. Iterator takes the place of Enumeration in the Java Collections Frame
    • JarFile (java.util.jar)
      JarFile is used to read jar entries and their associated data from jar files.
    • JPanel (javax.swing)
    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