Package org.apache.camel.support
Class ResolverHelper
java.lang.Object
org.apache.camel.support.ResolverHelper
Some helper methods for new resolvers (like
ComponentResolver,
DataFormatResolver, etc.).-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.camel.ComponentlookupComponentInRegistryWithFallback(org.apache.camel.CamelContext context, String name) static org.apache.camel.ComponentlookupComponentInRegistryWithFallback(org.apache.camel.CamelContext context, String name, ResolverHelper.LookupExceptionHandler exceptionHandler) static org.apache.camel.spi.DataFormatFactorylookupDataFormatFactoryInRegistryWithFallback(org.apache.camel.CamelContext context, String name) static org.apache.camel.spi.DataFormatFactorylookupDataFormatFactoryInRegistryWithFallback(org.apache.camel.CamelContext context, String name, ResolverHelper.LookupExceptionHandler exceptionHandler) static org.apache.camel.spi.DataFormatlookupDataFormatInRegistryWithFallback(org.apache.camel.CamelContext context, String name) static org.apache.camel.spi.DataFormatlookupDataFormatInRegistryWithFallback(org.apache.camel.CamelContext context, String name, ResolverHelper.LookupExceptionHandler exceptionHandler) static org.apache.camel.spi.LanguagelookupLanguageInRegistryWithFallback(org.apache.camel.CamelContext context, String name) static org.apache.camel.spi.LanguagelookupLanguageInRegistryWithFallback(org.apache.camel.CamelContext context, String name, ResolverHelper.LookupExceptionHandler exceptionHandler) static <T> Optional<T> resolveService(org.apache.camel.CamelContext camelContext, String factoryKey, Class<T> factoryClass) Create an instance of the given factory using the default factory finderstatic <T> Optional<T> resolveService(org.apache.camel.CamelContext camelContext, String factoryPath, String factoryKey, Class<T> factoryClass) Create an instance of the given factory.static <T> Optional<T> resolveService(org.apache.camel.CamelContext camelContext, org.apache.camel.spi.FactoryFinder factoryFinder, String factoryKey, Class<T> factoryClass) Create an instance of the given factory.
-
Field Details
-
COMPONENT_FALLBACK_SUFFIX
- See Also:
-
DATA_FORMAT_FALLBACK_SUFFIX
- See Also:
-
DATA_FORMAT_FACTORY_FALLBACK_SUFFIX
- See Also:
-
LANGUAGE_FALLBACK_SUFFIX
- See Also:
-
-
Method Details
-
lookupComponentInRegistryWithFallback
public static org.apache.camel.Component lookupComponentInRegistryWithFallback(org.apache.camel.CamelContext context, String name) -
lookupComponentInRegistryWithFallback
public static org.apache.camel.Component lookupComponentInRegistryWithFallback(org.apache.camel.CamelContext context, String name, ResolverHelper.LookupExceptionHandler exceptionHandler) -
lookupDataFormatInRegistryWithFallback
public static org.apache.camel.spi.DataFormat lookupDataFormatInRegistryWithFallback(org.apache.camel.CamelContext context, String name) -
lookupDataFormatInRegistryWithFallback
public static org.apache.camel.spi.DataFormat lookupDataFormatInRegistryWithFallback(org.apache.camel.CamelContext context, String name, ResolverHelper.LookupExceptionHandler exceptionHandler) -
lookupDataFormatFactoryInRegistryWithFallback
public static org.apache.camel.spi.DataFormatFactory lookupDataFormatFactoryInRegistryWithFallback(org.apache.camel.CamelContext context, String name) -
lookupDataFormatFactoryInRegistryWithFallback
public static org.apache.camel.spi.DataFormatFactory lookupDataFormatFactoryInRegistryWithFallback(org.apache.camel.CamelContext context, String name, ResolverHelper.LookupExceptionHandler exceptionHandler) -
lookupLanguageInRegistryWithFallback
public static org.apache.camel.spi.Language lookupLanguageInRegistryWithFallback(org.apache.camel.CamelContext context, String name) -
lookupLanguageInRegistryWithFallback
public static org.apache.camel.spi.Language lookupLanguageInRegistryWithFallback(org.apache.camel.CamelContext context, String name, ResolverHelper.LookupExceptionHandler exceptionHandler) -
resolveService
public static <T> Optional<T> resolveService(org.apache.camel.CamelContext camelContext, String factoryPath, String factoryKey, Class<T> factoryClass) Create an instance of the given factory.- Parameters:
camelContext- theCamelContextfactoryPath- the path of the factory filefactoryKey- the key used top lookup the factory classfactoryClass- the type of the class- Returns:
- an instance fo the given factory
-
resolveService
public static <T> Optional<T> resolveService(org.apache.camel.CamelContext camelContext, String factoryKey, Class<T> factoryClass) Create an instance of the given factory using the default factory finder- Parameters:
camelContext- theCamelContextfactoryKey- the key used top lookup the factory classfactoryClass- the type of the class- Returns:
- an instance fo the given factory
-
resolveService
public static <T> Optional<T> resolveService(org.apache.camel.CamelContext camelContext, org.apache.camel.spi.FactoryFinder factoryFinder, String factoryKey, Class<T> factoryClass) Create an instance of the given factory.- Parameters:
camelContext- theCamelContextfactoryFinder- theFactoryFinderto usefactoryKey- the key used top lookup the factory classfactoryClass- the type of the class- Returns:
- an instance fo the given factory
-