Package org.apache.camel
Interface ExtendedCamelContext
-
- All Superinterfaces:
AutoCloseable,CamelContext,CamelContextLifecycle,RuntimeConfiguration
public interface ExtendedCamelContext extends CamelContext
ExtendedCamelContextwhich contains the methods and APIs that are not primary intended for Camel end users but for SPI, custom components, or more advanced used-cases with Camel.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidaddBootstrap(BootstrapCloseable bootstrap)Adds aBootstrapCloseabletask.voidaddInterceptStrategy(InterceptStrategy interceptStrategy)Adds the given interceptor strategyvoidaddLogListener(LogListener listener)Adds aLogListener.voidaddRoute(Route route)Internal API for adding routes.ProcessorcreateErrorHandler(Route route, Processor processor)Internal API for creating error handler.voiddisposeModel()Danger!!! This will dispose the route model from theCamelContextwhich is used for lightweight mode.AnnotationBasedProcessorFactorygetAnnotationBasedProcessorFactory()Gets theAnnotationBasedProcessorFactoryto use.AsyncProcessorAwaitManagergetAsyncProcessorAwaitManager()Gets theAsyncProcessorawait manager.StringgetBasePackageScan()Package name to use as base (offset) for classpath scanning of custom services, type converters, and the likesBeanIntrospectiongetBeanIntrospection()Gets theBeanIntrospectionCamelBeanPostProcessorgetBeanPostProcessor()Returns the bean post processor used to do any bean customization.BeanProcessorFactorygetBeanProcessorFactory()Gets theBeanProcessorFactoryto use.BeanProxyFactorygetBeanProxyFactory()Gets theBeanProxyFactoryto use.ConfigurerResolvergetBootstrapConfigurerResolver()Gets the bootstrapConfigurerResolverto use.FactoryFindergetBootstrapFactoryFinder()Gets the bootstrap FactoryFinder which will be used for the loading the factory class from META-INF.FactoryFindergetBootstrapFactoryFinder(String path)Gets the bootstrap FactoryFinder which will be used for the loading the factory class from META-INF in the given path.CliConnectorFactorygetCliConnectorFactory()Gets theCliConnectorFactory(optional).ComponentNameResolvergetComponentNameResolver()Gets theComponentNameResolverto use.ComponentResolvergetComponentResolver()Gets theComponentResolverto use.ConfigurerResolvergetConfigurerResolver()Gets theConfigurerResolverto use.DataFormatResolvergetDataFormatResolver()Gets the current data format resolverFactoryFindergetDefaultFactoryFinder()Gets the default FactoryFinder which will be used for the loading the factory class from META-INFDeferServiceFactorygetDeferServiceFactory()Gets theDeferServiceFactoryto use.CamelDependencyInjectionAnnotationFactorygetDependencyInjectionAnnotationFactory()Returns the annotation dependency injection factory.DevConsoleResolvergetDevConsoleResolver()Gets the current dev console resolverEndpointgetEndpoint(NormalizedEndpointUri uri)Resolves the given name to anEndpointof the specified type.EndpointgetEndpoint(NormalizedEndpointUri uri, Map<String,Object> parameters)Resolves the given name to anEndpointof the specified type.EndpointUriFactorygetEndpointUriFactory(String scheme)Gets theEndpointUriFactoryfor the given component name.ScheduledExecutorServicegetErrorHandlerExecutorService()Gets the default shared thread pool for error handlers which leverages this for asynchronous redelivery tasks.ErrorHandlerFactorygetErrorHandlerFactory()Gets the default error handler builder which is inherited by the routesExchangeFactorygetExchangeFactory()Gets the exchange factory to use.ExchangeFactoryManagergetExchangeFactoryManager()Gets the exchange factory manager to use.FactoryFindergetFactoryFinder(String path)Gets the FactoryFinder which will be used for the loading the factory class from META-INF in the given pathFactoryFinderResolvergetFactoryFinderResolver()Gets the factory finder resolver to useHeadersMapFactorygetHeadersMapFactory()Gets theHeadersMapFactoryto use.HealthCheckResolvergetHealthCheckResolver()Gets the current health check resolverInterceptEndpointFactorygetInterceptEndpointFactory()Gets the currentInterceptEndpointFactoryList<InterceptStrategy>getInterceptStrategies()Gets the interceptor strategiesInternalProcessorFactorygetInternalProcessorFactory()Gets the currentInternalProcessorFactoryRouteControllergetInternalRouteController()InternalRouteControllerthat are only used internally by Camel to perform basic route operations.LanguageResolvergetLanguageResolver()Gets theLanguageResolverto use.Set<LogListener>getLogListeners()Gets a list ofLogListener(can be null if empty).ManagementMBeanAssemblergetManagementMBeanAssembler()Returns the management mbean assemblerModelineFactorygetModelineFactory()Gets theModelineFactory.ModelJAXBContextFactorygetModelJAXBContextFactory()Returns the JAXB Context factory used to create Models.ModelToXMLDumpergetModelToXMLDumper()Gets theModelToXMLDumperto be used.NodeIdFactorygetNodeIdFactory()Gets the node id factoryPackageScanClassResolvergetPackageScanClassResolver()Returns the package scanning class resolverPackageScanResourceResolvergetPackageScanResourceResolver()Returns the package scanning resource resolverPeriodTaskResolvergetPeriodTaskResolver()Gets the period task resolverPeriodTaskSchedulergetPeriodTaskScheduler()Gets the period task schedulerProcessorExchangeFactorygetProcessorExchangeFactory()Gets the processor exchange factory to use.ProcessorFactorygetProcessorFactory()Gets the currentProcessorFactoryEndpointgetPrototypeEndpoint(String uri)Resolves the given name to anEndpointof the specified type (scope is prototype).EndpointgetPrototypeEndpoint(NormalizedEndpointUri uri)Resolves the given name to anEndpointof the specified type (scope is prototype).ReactiveExecutorgetReactiveExecutor()Gets theReactiveExecutorto use.ResourceLoadergetResourceLoader()Gets theResourceLoaderto be used.RestBindingJaxbDataFormatFactorygetRestBindingJaxbDataFormatFactory()Gets theRestBindingJaxbDataFormatFactoryto be used.RouteFactorygetRouteFactory()Gets the currentRouteFactoryRoutesLoadergetRoutesLoader()Gets theRoutesLoaderto be used.List<RouteStartupOrder>getRouteStartupOrder()Returns the order in which the route inputs was started.RuntimeCamelCataloggetRuntimeCamelCatalog()Gets theRuntimeCamelCatalogif available on the classpath.List<Service>getServices()Returns an unmodifiable list of the services registered currently in thisCamelContext.StartupStepRecordergetStartupStepRecorder()Gets theStartupStepRecorderto use.bytegetStatusPhase()TheCamelContexthave additional phases that are not defined inServiceStatusand this method provides the phase ordinal value.StringgetTestExcludeRoutes()Used during unit-testing where it is possible to specify a set of routes to exclude from discoveryUnitOfWorkFactorygetUnitOfWorkFactory()Gets theUnitOfWorkFactoryto use.UriFactoryResolvergetUriFactoryResolver()Gets theUriFactoryResolverto use.XMLRoutesDefinitionLoadergetXMLRoutesDefinitionLoader()Deprecated.EndpointhasEndpoint(NormalizedEndpointUri uri)Is the given endpoint already registered in theEndpointRegistrybooleanisEventNotificationApplicable()Whether exchange event notification is applicable (possible).booleanisLightweight()Whether to run in lightweight mode which triggers some optimizations and memory reduction.booleanisSetupRoutes()Indicates whether current thread is setting up route(s) as part of starting Camel.NormalizedEndpointUrinormalizeUri(String uri)Normalizes the given uri.voidregisterEndpointCallback(EndpointStrategy strategy)Registers acallbackto allow you to do custom logic when anEndpointis about to be registered to theEndpointRegistry.voidremoveRoute(Route route)Internal API for removing routes.StringresolvePropertyPlaceholders(String text, boolean keepUnresolvedOptional)Parses the given text and resolve any property placeholders - using {{key}}.voidsetAnnotationBasedProcessorFactory(AnnotationBasedProcessorFactory annotationBasedProcessorFactory)Sets a customAnnotationBasedProcessorFactoryto use.voidsetAsyncProcessorAwaitManager(AsyncProcessorAwaitManager manager)Sets a customAsyncProcessorawait manager.voidsetBasePackageScan(String basePackageScan)Package name to use as base (offset) for classpath scanning of custom services, type converters, and the likesvoidsetBeanIntrospection(BeanIntrospection beanIntrospection)Sets a customBeanIntrospection.voidsetBeanPostProcessor(CamelBeanPostProcessor beanPostProcessor)Sets a custom bean post processor to use.voidsetBootstrapConfigurerResolver(ConfigurerResolver configurerResolver)sets the bootstrapConfigurerResolverto use.voidsetBootstrapFactoryFinder(FactoryFinder factoryFinder)Sets the bootstrap FactoryFinder which will be used for the loading the factory class from META-INF.voidsetCliConnectorFactory(CliConnectorFactory cliConnectorFactory)Sets theCliConnectorFactoryto use.voidsetComponentNameResolver(ComponentNameResolver componentNameResolver)Sets a customComponentNameResolverto use.voidsetComponentResolver(ComponentResolver componentResolver)Sets a customComponentResolverto use.voidsetConfigurerResolver(ConfigurerResolver configurerResolver)Sets theConfigurerResolverto use.voidsetDataFormatResolver(DataFormatResolver dataFormatResolver)Sets a custom data format resolvervoidsetDeferServiceFactory(DeferServiceFactory deferServiceFactory)Sets a customDeferServiceFactoryto use.voidsetDependencyInjectionAnnotationFactory(CamelDependencyInjectionAnnotationFactory factory)Sets a custom annotation dependency injection factory.voidsetDescription(String description)Sets the description of this Camel application.voidsetDevConsoleResolver(DevConsoleResolver devConsoleResolver)Sets a custom dev console resolvervoidsetErrorHandlerFactory(ErrorHandlerFactory errorHandlerFactory)Sets the default error handler builder which is inherited by the routesvoidsetEventNotificationApplicable(boolean eventNotificationApplicable)Used as internal optimization in Camel to flag whether exchange event notification is applicable or not.voidsetExchangeFactory(ExchangeFactory exchangeFactory)Sets a custom exchange factory to use.voidsetExchangeFactoryManager(ExchangeFactoryManager exchangeFactoryManager)Sets a custom exchange factory manager to use.voidsetFactoryFinderResolver(FactoryFinderResolver resolver)Sets the factory finder resolver to use.voidsetHeadersMapFactory(HeadersMapFactory factory)Sets a customHeadersMapFactoryto be used.voidsetHealthCheckResolver(HealthCheckResolver healthCheckResolver)Sets a custom health check resolvervoidsetInterceptEndpointFactory(InterceptEndpointFactory interceptEndpointFactory)Sets a customInterceptEndpointFactoryvoidsetInternalProcessorFactory(InternalProcessorFactory internalProcessorFactory)Sets a customInternalProcessorFactoryvoidsetLanguageResolver(LanguageResolver languageResolver)Sets a customLanguageResolverto use.voidsetLightweight(boolean lightweight)Whether to run in lightweight mode which triggers some optimizations and memory reduction.voidsetModelineFactory(ModelineFactory modelineFactory)Sets a customModelineFactory.voidsetModelJAXBContextFactory(ModelJAXBContextFactory modelJAXBContextFactory)Sets a custom JAXB Context factory to be usedvoidsetModelToXMLDumper(ModelToXMLDumper modelToXMLDumper)Sets a customModelToXMLDumperto be used.voidsetName(String name)Sets the name (id) of this context.voidsetNodeIdFactory(NodeIdFactory factory)Uses a custom node id factory when generating auto assigned ids to the nodes in the route definitionsvoidsetPackageScanClassResolver(PackageScanClassResolver resolver)Sets the package scanning class resolver to usevoidsetPackageScanResourceResolver(PackageScanResourceResolver resolver)Sets the package scanning resource resolver to usevoidsetPeriodTaskResolver(PeriodTaskResolver periodTaskResolver)To use a custom period task resolvervoidsetPeriodTaskScheduler(PeriodTaskScheduler periodTaskScheduler)To use a custom period task schedulervoidsetProcessorExchangeFactory(ProcessorExchangeFactory processorExchangeFactory)Sets a custom processor exchange factory to use.voidsetProcessorFactory(ProcessorFactory processorFactory)Sets a customProcessorFactoryvoidsetReactiveExecutor(ReactiveExecutor reactiveExecutor)Sets a customReactiveExecutorto be used.voidsetRegistry(Registry registry)Sets the registry Camel should use for looking up beans by name or type.voidsetResourceLoader(ResourceLoader resourceLoader)Sets a customResourceLoaderto be used.voidsetRestBindingJaxbDataFormatFactory(RestBindingJaxbDataFormatFactory restBindingJaxbDataFormatFactory)Sets a customRestBindingJaxbDataFormatFactoryto be used.voidsetRouteFactory(RouteFactory routeFactory)Sets a customRouteFactoryvoidsetRoutesLoader(RoutesLoader routesLoader)Sets a customRoutesLoaderto be used.voidsetRuntimeCamelCatalog(RuntimeCamelCatalog runtimeCamelCatalog)Sets theRuntimeCamelCatalogto use.voidsetStartupStepRecorder(StartupStepRecorder startupStepRecorder)Sets theStartupStepRecorderto use.voidsetUnitOfWorkFactory(UnitOfWorkFactory unitOfWorkFactory)Sets a customUnitOfWorkFactoryto use.voidsetupManagement(Map<String,Object> options)Setup management according to whether JMX is enabled or disabled.voidsetupRoutes(boolean done)Method to signal toCamelContextthat the process to initialize setup routes is in progress.voidsetUriFactoryResolver(UriFactoryResolver uriFactoryResolver)Sets theUriFactoryResolverto use.voidsetXMLRoutesDefinitionLoader(XMLRoutesDefinitionLoader xmlRoutesDefinitionLoader)Sets a customXMLRoutesDefinitionLoaderto be used.-
Methods inherited from interface org.apache.camel.CamelContext
adapt, addComponent, addEndpoint, addLifecycleStrategy, addPrototypeService, addRouteFromTemplate, addRouteFromTemplate, addRouteFromTemplate, addRouteFromTemplate, addRoutePolicyFactory, addRoutes, addRoutesConfigurations, addService, addService, addService, addStartupListener, addTemplatedRoutes, createConsumerTemplate, createConsumerTemplate, createDataFormat, createFluentProducerTemplate, createFluentProducerTemplate, createProducerTemplate, createProducerTemplate, deferStartService, disableJMX, getApplicationContextClassLoader, getClassResolver, getComponent, getComponent, getComponent, getComponent, getComponentNames, getDataFormatNames, getDebugger, getDescription, getEndpoint, getEndpoint, getEndpoint, getEndpointMap, getEndpointRegistry, getEndpoints, getExecutorServiceManager, getExtension, getGlobalEndpointConfiguration, getGlobalOption, getGlobalOptions, getInflightRepository, getInjector, getLanguageNames, getLifecycleStrategies, getManagementName, getManagementNameStrategy, getManagementStrategy, getMDCLoggingKeysPattern, getMessageHistoryFactory, getName, getNameStrategy, getProcessor, getProcessor, getPropertiesComponent, getRegistry, getRegistry, getRestConfiguration, getRestRegistry, getRoute, getRouteController, getRoutePolicyFactories, getRoutes, getRoutesSize, getRuntimeEndpointRegistry, getShutdownStrategy, getSSLContextParameters, getStartDate, getStartupSummaryLevel, getStreamCachingStrategy, getTracer, getTracingLoggingFormat, getTransformerRegistry, getTypeConverter, getTypeConverterRegistry, getUptime, getUptimeMillis, getUuidGenerator, getValidatorRegistry, getVaultConfiguration, getVersion, hasComponent, hasEndpoint, hasService, hasService, hasServices, isBacklogTracingStandby, isDevConsole, isDumpRoutes, isLoadHealthChecks, isLoadTypeConverters, isModeline, isSourceLocationEnabled, isTracingStandby, isTypeConverterStatisticsEnabled, isUseBreadcrumb, isUseDataType, isUseMDCLogging, isVetoStarted, removeComponent, removeEndpoint, removeEndpoints, removeRoute, removeRouteTemplates, removeService, resolveDataFormat, resolveLanguage, resolvePropertyPlaceholders, resolveTransformer, resolveTransformer, resolveValidator, setApplicationContextClassLoader, setBacklogTracingStandby, setClassResolver, setDebugger, setDevConsole, setDumpRoutes, setExecutorServiceManager, setExtension, setGlobalOptions, setInflightRepository, setInjector, setLoadHealthChecks, setLoadTypeConverters, setManagementName, setManagementNameStrategy, setManagementStrategy, setMDCLoggingKeysPattern, setMessageHistoryFactory, setModeline, setNameStrategy, setPropertiesComponent, setRestConfiguration, setRestRegistry, setRouteController, setRuntimeEndpointRegistry, setShutdownStrategy, setSourceLocationEnabled, setSSLContextParameters, setStartupSummaryLevel, setStreamCachingStrategy, setTracer, setTracingLoggingFormat, setTracingStandby, setTypeConverterRegistry, setTypeConverterStatisticsEnabled, setUseBreadcrumb, setUseDataType, setUseMDCLogging, setUuidGenerator, setVaultConfiguration
-
Methods inherited from interface org.apache.camel.CamelContextLifecycle
build, close, getStatus, init, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, resume, shutdown, start, stop, suspend
-
Methods inherited from interface org.apache.camel.RuntimeConfiguration
getDelayer, getShutdownRoute, getShutdownRunningTask, getTracingPattern, isAllowUseOriginalMessage, isAutoStartup, isAutowiredEnabled, isBacklogTracing, isCaseInsensitiveHeaders, isDebugging, isLogExhaustedMessageBody, isLogMask, isMessageHistory, isStreamCaching, isTracing, setAllowUseOriginalMessage, setAutoStartup, setAutowiredEnabled, setBacklogTracing, setCaseInsensitiveHeaders, setDebugging, setDelayer, setLogExhaustedMessageBody, setLogMask, setMessageHistory, setShutdownRoute, setShutdownRunningTask, setStreamCaching, setTracing, setTracingPattern
-
-
-
-
Method Detail
-
setName
void setName(String name)
Sets the name (id) of this context. This operation is mostly only used by different Camel runtimes such as camel-spring, camel-cdi, camel-spring-boot etc. Important: Setting the name should only be set before CamelContext is started.- Parameters:
name- the name
-
setDescription
void setDescription(String description)
Sets the description of this Camel application.
-
setRegistry
void setRegistry(Registry registry)
Sets the registry Camel should use for looking up beans by name or type. This operation is mostly only used by different Camel runtimes such as camel-spring, camel-cdi, camel-spring-boot etc. Important: Setting the registry should only be set before CamelContext is started.- Parameters:
registry- the registry such as DefaultRegistry or
-
setupRoutes
void setupRoutes(boolean done)
Method to signal toCamelContextthat the process to initialize setup routes is in progress.- Parameters:
done- false to start the process, call again with true to signal its done.- See Also:
isSetupRoutes()
-
isSetupRoutes
boolean isSetupRoutes()
Indicates whether current thread is setting up route(s) as part of starting Camel. This can be useful to know byLifecycleStrategyor the likes, in case they need to react differently. As the startup procedure ofCamelContextis slightly different when using plain Java versus camel-spring-xml or camel-blueprint, then we need to know when spring/blueprint are setting up the routes, which can happen after theCamelContextitself is in started state, due the asynchronous event nature of especially blueprint.- Returns:
- true if current thread is setting up route(s), or false if not.
-
registerEndpointCallback
void registerEndpointCallback(EndpointStrategy strategy)
Registers acallbackto allow you to do custom logic when anEndpointis about to be registered to theEndpointRegistry. When a callback is registered it will be executed on the already registered endpoints allowing you to catch-up- Parameters:
strategy- callback to be invoked
-
getPrototypeEndpoint
Endpoint getPrototypeEndpoint(String uri)
Resolves the given name to anEndpointof the specified type (scope is prototype). If the name has a singleton endpoint registered, then the singleton is returned. Otherwise, a newEndpointis created. The endpoint is NOT registered in theEndpointRegistryas its prototype scoped, and therefore expected to be short lived and discarded after use (you must stop and shutdown the endpoint when no longer in use).- Parameters:
uri- the URI of the endpoint- Returns:
- the endpoint
- See Also:
CamelContext.getEndpoint(String)
-
getPrototypeEndpoint
Endpoint getPrototypeEndpoint(NormalizedEndpointUri uri)
Resolves the given name to anEndpointof the specified type (scope is prototype). If the name has a singleton endpoint registered, then the singleton is returned. Otherwise, a newEndpointis created. The endpoint is NOT registered in theEndpointRegistryas its prototype scoped, and therefore expected to be short lived and discarded after use (you must stop and shutdown the endpoint when no longer in use).- Parameters:
uri- the URI of the endpoint- Returns:
- the endpoint
- See Also:
CamelContext.getEndpoint(String)
-
hasEndpoint
Endpoint hasEndpoint(NormalizedEndpointUri uri)
Is the given endpoint already registered in theEndpointRegistry- Parameters:
uri- the URI of the endpoint- Returns:
- the registered endpoint or null if not registered
-
getEndpoint
Endpoint getEndpoint(NormalizedEndpointUri uri)
Resolves the given name to anEndpointof the specified type. If the name has a singleton endpoint registered, then the singleton is returned. Otherwise, a newEndpointis created and registered in theEndpointRegistry.- Parameters:
uri- the URI of the endpoint- Returns:
- the endpoint
- See Also:
getPrototypeEndpoint(String)
-
getEndpoint
Endpoint getEndpoint(NormalizedEndpointUri uri, Map<String,Object> parameters)
Resolves the given name to anEndpointof the specified type. If the name has a singleton endpoint registered, then the singleton is returned. Otherwise, a newEndpointis created and registered in theEndpointRegistry.- Parameters:
uri- the URI of the endpointparameters- the parameters to customize the endpoint- Returns:
- the endpoint
- See Also:
getPrototypeEndpoint(String)
-
normalizeUri
NormalizedEndpointUri normalizeUri(String uri)
Normalizes the given uri.- Parameters:
uri- the uri- Returns:
- a normalized uri
-
getRouteStartupOrder
List<RouteStartupOrder> getRouteStartupOrder()
Returns the order in which the route inputs was started. The order may not be according to the startupOrder defined on the route. For example a route could be started manually later, or new routes added at runtime.- Returns:
- a list in the order how routes was started
-
addBootstrap
void addBootstrap(BootstrapCloseable bootstrap)
Adds aBootstrapCloseabletask.
-
getServices
List<Service> getServices()
Returns an unmodifiable list of the services registered currently in thisCamelContext.
-
getExchangeFactory
ExchangeFactory getExchangeFactory()
Gets the exchange factory to use.
-
setExchangeFactory
void setExchangeFactory(ExchangeFactory exchangeFactory)
Sets a custom exchange factory to use.
-
getExchangeFactoryManager
ExchangeFactoryManager getExchangeFactoryManager()
Gets the exchange factory manager to use.
-
setExchangeFactoryManager
void setExchangeFactoryManager(ExchangeFactoryManager exchangeFactoryManager)
Sets a custom exchange factory manager to use.
-
getProcessorExchangeFactory
ProcessorExchangeFactory getProcessorExchangeFactory()
Gets the processor exchange factory to use.
-
setProcessorExchangeFactory
void setProcessorExchangeFactory(ProcessorExchangeFactory processorExchangeFactory)
Sets a custom processor exchange factory to use.
-
getBeanPostProcessor
CamelBeanPostProcessor getBeanPostProcessor()
Returns the bean post processor used to do any bean customization.- Returns:
- the bean post processor.
-
setBeanPostProcessor
void setBeanPostProcessor(CamelBeanPostProcessor beanPostProcessor)
Sets a custom bean post processor to use.
-
getDependencyInjectionAnnotationFactory
CamelDependencyInjectionAnnotationFactory getDependencyInjectionAnnotationFactory()
Returns the annotation dependency injection factory.
-
setDependencyInjectionAnnotationFactory
void setDependencyInjectionAnnotationFactory(CamelDependencyInjectionAnnotationFactory factory)
Sets a custom annotation dependency injection factory.
-
getManagementMBeanAssembler
ManagementMBeanAssembler getManagementMBeanAssembler()
Returns the management mbean assembler- Returns:
- the mbean assembler
-
getErrorHandlerFactory
ErrorHandlerFactory getErrorHandlerFactory()
Gets the default error handler builder which is inherited by the routes- Returns:
- the builder
-
setErrorHandlerFactory
void setErrorHandlerFactory(ErrorHandlerFactory errorHandlerFactory)
Sets the default error handler builder which is inherited by the routes- Parameters:
errorHandlerFactory- the builder
-
getNodeIdFactory
NodeIdFactory getNodeIdFactory()
Gets the node id factory- Returns:
- the node id factory
-
setNodeIdFactory
void setNodeIdFactory(NodeIdFactory factory)
Uses a custom node id factory when generating auto assigned ids to the nodes in the route definitions- Parameters:
factory- custom factory to use
-
getComponentResolver
ComponentResolver getComponentResolver()
Gets theComponentResolverto use.
-
setComponentResolver
void setComponentResolver(ComponentResolver componentResolver)
Sets a customComponentResolverto use.
-
getComponentNameResolver
ComponentNameResolver getComponentNameResolver()
Gets theComponentNameResolverto use.
-
setComponentNameResolver
void setComponentNameResolver(ComponentNameResolver componentNameResolver)
Sets a customComponentNameResolverto use.
-
getLanguageResolver
LanguageResolver getLanguageResolver()
Gets theLanguageResolverto use.
-
setLanguageResolver
void setLanguageResolver(LanguageResolver languageResolver)
Sets a customLanguageResolverto use.
-
getDataFormatResolver
DataFormatResolver getDataFormatResolver()
Gets the current data format resolver- Returns:
- the resolver
-
setDataFormatResolver
void setDataFormatResolver(DataFormatResolver dataFormatResolver)
Sets a custom data format resolver- Parameters:
dataFormatResolver- the resolver
-
getHealthCheckResolver
HealthCheckResolver getHealthCheckResolver()
Gets the current health check resolver- Returns:
- the resolver
-
setHealthCheckResolver
void setHealthCheckResolver(HealthCheckResolver healthCheckResolver)
Sets a custom health check resolver- Parameters:
healthCheckResolver- the resolver
-
getDevConsoleResolver
DevConsoleResolver getDevConsoleResolver()
Gets the current dev console resolver- Returns:
- the resolver
-
setDevConsoleResolver
void setDevConsoleResolver(DevConsoleResolver devConsoleResolver)
Sets a custom dev console resolver- Parameters:
devConsoleResolver- the resolver
-
getPackageScanClassResolver
PackageScanClassResolver getPackageScanClassResolver()
Returns the package scanning class resolver- Returns:
- the resolver
-
setPackageScanClassResolver
void setPackageScanClassResolver(PackageScanClassResolver resolver)
Sets the package scanning class resolver to use- Parameters:
resolver- the resolver
-
getPackageScanResourceResolver
PackageScanResourceResolver getPackageScanResourceResolver()
Returns the package scanning resource resolver- Returns:
- the resolver
-
setPackageScanResourceResolver
void setPackageScanResourceResolver(PackageScanResourceResolver resolver)
Sets the package scanning resource resolver to use- Parameters:
resolver- the resolver
-
getDefaultFactoryFinder
FactoryFinder getDefaultFactoryFinder()
Gets the default FactoryFinder which will be used for the loading the factory class from META-INF- Returns:
- the default factory finder
- See Also:
getBootstrapFactoryFinder()
-
getBootstrapFactoryFinder
FactoryFinder getBootstrapFactoryFinder()
Gets the bootstrap FactoryFinder which will be used for the loading the factory class from META-INF. This bootstrap factory finder is only intended to be used during bootstrap (starting) CamelContext.- Returns:
- the bootstrap factory finder
- See Also:
getDefaultFactoryFinder()
-
setBootstrapFactoryFinder
void setBootstrapFactoryFinder(FactoryFinder factoryFinder)
Sets the bootstrap FactoryFinder which will be used for the loading the factory class from META-INF. This bootstrap factory finder is only intended to be used during bootstrap (starting) CamelContext.- See Also:
getDefaultFactoryFinder()
-
getBootstrapFactoryFinder
FactoryFinder getBootstrapFactoryFinder(String path)
Gets the bootstrap FactoryFinder which will be used for the loading the factory class from META-INF in the given path. This bootstrap factory finder is only intended to be used during bootstrap (starting) CamelContext.- Parameters:
path- the META-INF path- Returns:
- the bootstrap factory finder
- See Also:
getDefaultFactoryFinder()
-
getBootstrapConfigurerResolver
ConfigurerResolver getBootstrapConfigurerResolver()
Gets the bootstrapConfigurerResolverto use. This bootstrap resolver is only intended to be used during bootstrap (starting) CamelContext.
-
setBootstrapConfigurerResolver
void setBootstrapConfigurerResolver(ConfigurerResolver configurerResolver)
sets the bootstrapConfigurerResolverto use. This bootstrap resolver is only intended to be used during bootstrap (starting) CamelContext.
-
getFactoryFinder
FactoryFinder getFactoryFinder(String path)
Gets the FactoryFinder which will be used for the loading the factory class from META-INF in the given path- Parameters:
path- the META-INF path- Returns:
- the factory finder
-
getFactoryFinderResolver
FactoryFinderResolver getFactoryFinderResolver()
Gets the factory finder resolver to use- Returns:
- the factory finder resolver
-
setFactoryFinderResolver
void setFactoryFinderResolver(FactoryFinderResolver resolver)
Sets the factory finder resolver to use.- Parameters:
resolver- the factory finder resolver
-
getProcessorFactory
ProcessorFactory getProcessorFactory()
Gets the currentProcessorFactory- Returns:
- the factory, can be null if no custom factory has been set
-
setProcessorFactory
void setProcessorFactory(ProcessorFactory processorFactory)
Sets a customProcessorFactory- Parameters:
processorFactory- the custom factory
-
getInternalProcessorFactory
InternalProcessorFactory getInternalProcessorFactory()
Gets the currentInternalProcessorFactory- Returns:
- the factory
-
setInternalProcessorFactory
void setInternalProcessorFactory(InternalProcessorFactory internalProcessorFactory)
Sets a customInternalProcessorFactory- Parameters:
internalProcessorFactory- the custom factory
-
getInterceptEndpointFactory
InterceptEndpointFactory getInterceptEndpointFactory()
Gets the currentInterceptEndpointFactory- Returns:
- the factory
-
setInterceptEndpointFactory
void setInterceptEndpointFactory(InterceptEndpointFactory interceptEndpointFactory)
Sets a customInterceptEndpointFactory- Parameters:
interceptEndpointFactory- the custom factory
-
getRouteFactory
RouteFactory getRouteFactory()
Gets the currentRouteFactory- Returns:
- the factory
-
setRouteFactory
void setRouteFactory(RouteFactory routeFactory)
Sets a customRouteFactory- Parameters:
routeFactory- the custom factory
-
getModelJAXBContextFactory
ModelJAXBContextFactory getModelJAXBContextFactory()
Returns the JAXB Context factory used to create Models.- Returns:
- the JAXB Context factory used to create Models.
-
setModelJAXBContextFactory
void setModelJAXBContextFactory(ModelJAXBContextFactory modelJAXBContextFactory)
Sets a custom JAXB Context factory to be used- Parameters:
modelJAXBContextFactory- a JAXB Context factory
-
getDeferServiceFactory
DeferServiceFactory getDeferServiceFactory()
Gets theDeferServiceFactoryto use.
-
setDeferServiceFactory
void setDeferServiceFactory(DeferServiceFactory deferServiceFactory)
Sets a customDeferServiceFactoryto use.
-
getUnitOfWorkFactory
UnitOfWorkFactory getUnitOfWorkFactory()
Gets theUnitOfWorkFactoryto use.
-
setUnitOfWorkFactory
void setUnitOfWorkFactory(UnitOfWorkFactory unitOfWorkFactory)
Sets a customUnitOfWorkFactoryto use.
-
getAnnotationBasedProcessorFactory
AnnotationBasedProcessorFactory getAnnotationBasedProcessorFactory()
Gets theAnnotationBasedProcessorFactoryto use.
-
setAnnotationBasedProcessorFactory
void setAnnotationBasedProcessorFactory(AnnotationBasedProcessorFactory annotationBasedProcessorFactory)
Sets a customAnnotationBasedProcessorFactoryto use.
-
getBeanProxyFactory
BeanProxyFactory getBeanProxyFactory()
Gets theBeanProxyFactoryto use.
-
getBeanProcessorFactory
BeanProcessorFactory getBeanProcessorFactory()
Gets theBeanProcessorFactoryto use.
-
getErrorHandlerExecutorService
ScheduledExecutorService getErrorHandlerExecutorService()
Gets the default shared thread pool for error handlers which leverages this for asynchronous redelivery tasks.
-
addInterceptStrategy
void addInterceptStrategy(InterceptStrategy interceptStrategy)
Adds the given interceptor strategy- Parameters:
interceptStrategy- the strategy
-
getInterceptStrategies
List<InterceptStrategy> getInterceptStrategies()
Gets the interceptor strategies- Returns:
- the list of current interceptor strategies
-
setupManagement
void setupManagement(Map<String,Object> options)
Setup management according to whether JMX is enabled or disabled.- Parameters:
options- optional parameters to configureManagementAgent.
-
getLogListeners
Set<LogListener> getLogListeners()
Gets a list ofLogListener(can be null if empty).
-
addLogListener
void addLogListener(LogListener listener)
Adds aLogListener.
-
getAsyncProcessorAwaitManager
AsyncProcessorAwaitManager getAsyncProcessorAwaitManager()
Gets theAsyncProcessorawait manager.- Returns:
- the manager
-
setAsyncProcessorAwaitManager
void setAsyncProcessorAwaitManager(AsyncProcessorAwaitManager manager)
Sets a customAsyncProcessorawait manager.- Parameters:
manager- the manager
-
getBeanIntrospection
BeanIntrospection getBeanIntrospection()
Gets theBeanIntrospection
-
setBeanIntrospection
void setBeanIntrospection(BeanIntrospection beanIntrospection)
Sets a customBeanIntrospection.
-
getHeadersMapFactory
HeadersMapFactory getHeadersMapFactory()
Gets theHeadersMapFactoryto use.
-
setHeadersMapFactory
void setHeadersMapFactory(HeadersMapFactory factory)
Sets a customHeadersMapFactoryto be used.
-
getReactiveExecutor
ReactiveExecutor getReactiveExecutor()
Gets theReactiveExecutorto use.
-
setReactiveExecutor
void setReactiveExecutor(ReactiveExecutor reactiveExecutor)
Sets a customReactiveExecutorto be used.
-
isEventNotificationApplicable
boolean isEventNotificationApplicable()
Whether exchange event notification is applicable (possible). This API is used internally in Camel as optimization. This is only for exchange events as this allows Camel to optimize to avoid preparing exchange events if there are no event listeners that are listening for exchange events.
-
setEventNotificationApplicable
void setEventNotificationApplicable(boolean eventNotificationApplicable)
Used as internal optimization in Camel to flag whether exchange event notification is applicable or not. This is only for exchange events as this allows Camel to optimize to avoid preparing exchange events if there are no event listeners that are listening for exchange events.
-
getXMLRoutesDefinitionLoader
@Deprecated XMLRoutesDefinitionLoader getXMLRoutesDefinitionLoader()
Deprecated.Gets theXMLRoutesDefinitionLoaderto be used.
-
setXMLRoutesDefinitionLoader
void setXMLRoutesDefinitionLoader(XMLRoutesDefinitionLoader xmlRoutesDefinitionLoader)
Sets a customXMLRoutesDefinitionLoaderto be used.
-
getRoutesLoader
RoutesLoader getRoutesLoader()
Gets theRoutesLoaderto be used.
-
setRoutesLoader
void setRoutesLoader(RoutesLoader routesLoader)
Sets a customRoutesLoaderto be used.
-
getResourceLoader
ResourceLoader getResourceLoader()
Gets theResourceLoaderto be used.
-
setResourceLoader
void setResourceLoader(ResourceLoader resourceLoader)
Sets a customResourceLoaderto be used.
-
getModelToXMLDumper
ModelToXMLDumper getModelToXMLDumper()
Gets theModelToXMLDumperto be used.
-
setModelToXMLDumper
void setModelToXMLDumper(ModelToXMLDumper modelToXMLDumper)
Sets a customModelToXMLDumperto be used.
-
getRestBindingJaxbDataFormatFactory
RestBindingJaxbDataFormatFactory getRestBindingJaxbDataFormatFactory()
Gets theRestBindingJaxbDataFormatFactoryto be used.
-
setRestBindingJaxbDataFormatFactory
void setRestBindingJaxbDataFormatFactory(RestBindingJaxbDataFormatFactory restBindingJaxbDataFormatFactory)
Sets a customRestBindingJaxbDataFormatFactoryto be used.
-
getRuntimeCamelCatalog
RuntimeCamelCatalog getRuntimeCamelCatalog()
Gets theRuntimeCamelCatalogif available on the classpath.
-
setRuntimeCamelCatalog
void setRuntimeCamelCatalog(RuntimeCamelCatalog runtimeCamelCatalog)
Sets theRuntimeCamelCatalogto use.
-
getConfigurerResolver
ConfigurerResolver getConfigurerResolver()
Gets theConfigurerResolverto use.
-
setConfigurerResolver
void setConfigurerResolver(ConfigurerResolver configurerResolver)
Sets theConfigurerResolverto use.
-
getUriFactoryResolver
UriFactoryResolver getUriFactoryResolver()
Gets theUriFactoryResolverto use.
-
setUriFactoryResolver
void setUriFactoryResolver(UriFactoryResolver uriFactoryResolver)
Sets theUriFactoryResolverto use.
-
getInternalRouteController
RouteController getInternalRouteController()
InternalRouteControllerthat are only used internally by Camel to perform basic route operations. Do not use this as end user.
-
getEndpointUriFactory
EndpointUriFactory getEndpointUriFactory(String scheme)
Gets theEndpointUriFactoryfor the given component name.
-
getStartupStepRecorder
StartupStepRecorder getStartupStepRecorder()
Gets theStartupStepRecorderto use.
-
setStartupStepRecorder
void setStartupStepRecorder(StartupStepRecorder startupStepRecorder)
Sets theStartupStepRecorderto use.
-
getCliConnectorFactory
CliConnectorFactory getCliConnectorFactory()
Gets theCliConnectorFactory(optional).
-
setCliConnectorFactory
void setCliConnectorFactory(CliConnectorFactory cliConnectorFactory)
Sets theCliConnectorFactoryto use.
-
addRoute
void addRoute(Route route)
Internal API for adding routes. Do not use this as end user.
-
removeRoute
void removeRoute(Route route)
Internal API for removing routes. Do not use this as end user.
-
createErrorHandler
Processor createErrorHandler(Route route, Processor processor) throws Exception
Internal API for creating error handler. Do not use this as end user.- Throws:
Exception
-
isLightweight
boolean isLightweight()
Whether to run in lightweight mode which triggers some optimizations and memory reduction. Danger this causes Camel to be less dynamic such as adding new route after Camel is started would not be possible.
-
setLightweight
void setLightweight(boolean lightweight)
Whether to run in lightweight mode which triggers some optimizations and memory reduction. Danger this causes Camel to be less dynamic such as adding new route after Camel is started would not be possible.
-
disposeModel
void disposeModel()
Danger!!! This will dispose the route model from theCamelContextwhich is used for lightweight mode. This means afterwards no new routes can be dynamically added. Any operations on the org.apache.camel.model.ModelCamelContext will return null or be a noop operation.
-
getTestExcludeRoutes
String getTestExcludeRoutes()
Used during unit-testing where it is possible to specify a set of routes to exclude from discovery
-
resolvePropertyPlaceholders
String resolvePropertyPlaceholders(String text, boolean keepUnresolvedOptional)
Parses the given text and resolve any property placeholders - using {{key}}. Important: If resolving placeholders on an endpoint uri, then you SHOULD use EndpointHelper#resolveEndpointUriPropertyPlaceholders instead.- Parameters:
text- the text such as an endpoint uri or the likeskeepUnresolvedOptional- whether to keep placeholders that are optional and was unresolved- Returns:
- the text with resolved property placeholders
- Throws:
IllegalArgumentException- is thrown if property placeholders was used and there was an error resolving them
-
getBasePackageScan
String getBasePackageScan()
Package name to use as base (offset) for classpath scanning of custom services, type converters, and the likes- Returns:
- the base package name (can bre null if not configured)
-
setBasePackageScan
void setBasePackageScan(String basePackageScan)
Package name to use as base (offset) for classpath scanning of custom services, type converters, and the likes- Parameters:
basePackageScan- the base package name
-
getModelineFactory
ModelineFactory getModelineFactory()
Gets theModelineFactory.
-
setModelineFactory
void setModelineFactory(ModelineFactory modelineFactory)
Sets a customModelineFactory.
-
getStatusPhase
byte getStatusPhase()
TheCamelContexthave additional phases that are not defined inServiceStatusand this method provides the phase ordinal value.
-
getPeriodTaskScheduler
PeriodTaskScheduler getPeriodTaskScheduler()
Gets the period task scheduler
-
setPeriodTaskScheduler
void setPeriodTaskScheduler(PeriodTaskScheduler periodTaskScheduler)
To use a custom period task scheduler
-
getPeriodTaskResolver
PeriodTaskResolver getPeriodTaskResolver()
Gets the period task resolver
-
setPeriodTaskResolver
void setPeriodTaskResolver(PeriodTaskResolver periodTaskResolver)
To use a custom period task resolver
-
-