Package org.apache.camel.core.xml
Class AbstractCamelContextFactoryBean<T extends org.apache.camel.model.ModelCamelContext>
- java.lang.Object
-
- org.apache.camel.model.IdentifiedType
-
- org.apache.camel.core.xml.AbstractCamelContextFactoryBean<T>
-
- All Implemented Interfaces:
org.apache.camel.model.rest.RestContainer,org.apache.camel.model.RouteConfigurationContainer,org.apache.camel.model.RouteContainer,org.apache.camel.model.RouteTemplateContainer
public abstract class AbstractCamelContextFactoryBean<T extends org.apache.camel.model.ModelCamelContext> extends org.apache.camel.model.IdentifiedType implements org.apache.camel.model.RouteTemplateContainer, org.apache.camel.model.RouteConfigurationContainer, org.apache.camel.model.RouteContainer, org.apache.camel.model.rest.RestContainerA factory to create and initialize aCamelContextand install routes either explicitly configured or found by searching the classpath for Java classes which extendRouteBuilder.
-
-
Constructor Summary
Constructors Constructor Description AbstractCamelContextFactoryBean()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()voiddestroy()protected voidfindRouteBuilders()Strategy method to try findRouteBuilderinstances on the classpathprotected abstract voidfindRouteBuildersByContextScan(org.apache.camel.spi.PackageScanFilter filter, boolean includeNonSingletons, List<org.apache.camel.RoutesBuilder> builders)protected abstract voidfindRouteBuildersByPackageScan(String[] packages, org.apache.camel.spi.PackageScanFilter filter, List<org.apache.camel.RoutesBuilder> builders)abstract StringgetAllowUseOriginalMessage()abstract StringgetAutoStartup()abstract StringgetAutowiredEnabled()abstract StringgetBacklogTrace()protected abstract <S> SgetBeanForType(Class<S> clazz)abstract StringgetBeanPostProcessorEnabled()abstract List<?>getBeans()abstract List<AbstractCamelFactoryBean<?>>getBeansFactory()abstract List<org.apache.camel.model.RouteBuilderDefinition>getBuilderRefs()abstract CamelJMXAgentDefinitiongetCamelJMXAgent()abstract CamelPropertyPlaceholderDefinitiongetCamelPropertyPlaceholder()abstract CamelRouteControllerDefinitiongetCamelRouteController()abstract CamelStreamCachingStrategyDefinitiongetCamelStreamCachingStrategy()abstract StringgetCaseInsensitiveHeaders()TgetContext()abstract TgetContext(boolean create)ClassLoadergetContextClassLoaderOnStart()abstract org.apache.camel.model.ContextScanDefinitiongetContextScan()abstract org.apache.camel.model.dataformat.DataFormatsDefinitiongetDataFormats()abstract StringgetDebug()abstract org.apache.camel.model.FaultToleranceConfigurationDefinitiongetDefaultFaultToleranceConfiguration()abstract org.apache.camel.model.HystrixConfigurationDefinitiongetDefaultHystrixConfiguration()abstract org.apache.camel.model.Resilience4jConfigurationDefinitiongetDefaultResilience4jConfiguration()abstract org.apache.camel.model.cloud.ServiceCallConfigurationDefinitiongetDefaultServiceCallConfiguration()abstract StringgetDelayer()abstract StringgetDependsOn()abstract StringgetDumpRoutes()abstract List<? extends AbstractCamelEndpointFactoryBean>getEndpoints()abstract StringgetErrorHandlerRef()abstract List<org.apache.camel.model.FaultToleranceConfigurationDefinition>getFaultToleranceConfigurations()abstract org.apache.camel.model.GlobalOptionsDefinitiongetGlobalOptions()abstract List<org.apache.camel.model.HystrixConfigurationDefinition>getHystrixConfigurations()abstract StringgetInflightRepositoryBrowseEnabled()abstract List<org.apache.camel.model.InterceptFromDefinition>getInterceptFroms()abstract List<org.apache.camel.model.InterceptDefinition>getIntercepts()abstract List<org.apache.camel.model.InterceptSendToEndpointDefinition>getInterceptSendToEndpoints()abstract StringgetLoadHealthChecks()abstract StringgetLoadTypeConverters()abstract StringgetLogExhaustedMessageBody()abstract StringgetLogMask()abstract StringgetManagementNamePattern()abstract StringgetMDCLoggingKeysPattern()abstract StringgetMessageHistory()TgetObject()abstract Class<T>getObjectType()abstract List<org.apache.camel.model.OnCompletionDefinition>getOnCompletions()abstract List<org.apache.camel.model.OnExceptionDefinition>getOnExceptions()abstract String[]getPackages()abstract org.apache.camel.model.PackageScanDefinitiongetPackageScan()abstract List<? extends AbstractCamelRedeliveryPolicyFactoryBean>getRedeliveryPolicies()abstract List<org.apache.camel.model.Resilience4jConfigurationDefinition>getResilience4jConfigurations()abstract org.apache.camel.model.rest.RestConfigurationDefinitiongetRestConfiguration()abstract List<org.apache.camel.model.RestContextRefDefinition>getRestRefs()abstract List<org.apache.camel.model.rest.RestDefinition>getRests()abstract List<org.apache.camel.model.RouteConfigurationContextRefDefinition>getRouteConfigurationRefs()abstract List<org.apache.camel.model.RouteConfigurationDefinition>getRouteConfigurations()abstract List<org.apache.camel.model.RouteContextRefDefinition>getRouteRefs()abstract List<org.apache.camel.model.RouteDefinition>getRoutes()abstract List<org.apache.camel.model.RouteTemplateContextRefDefinition>getRouteTemplateRefs()abstract List<org.apache.camel.model.RouteTemplateDefinition>getRouteTemplates()abstract StringgetRuntimeEndpointRegistryEnabled()abstract List<org.apache.camel.model.cloud.ServiceCallConfigurationDefinition>getServiceCallConfigurations()abstract org.apache.camel.ShutdownRoutegetShutdownRoute()abstract org.apache.camel.ShutdownRunningTaskgetShutdownRunningTask()abstract StringgetSourceLocationEnabled()abstract org.apache.camel.StartupSummaryLevelgetStartupSummaryLevel()abstract StringgetStreamCache()abstract StringgetThreadNamePattern()abstract List<org.apache.camel.model.ThreadPoolProfileDefinition>getThreadPoolProfiles()abstract StringgetTrace()abstract StringgetTraceLoggingFormat()abstract StringgetTracePattern()abstract org.apache.camel.model.transformer.TransformersDefinitiongetTransformers()abstract org.apache.camel.TypeConverterExistsgetTypeConverterExists()abstract org.apache.camel.LoggingLevelgetTypeConverterExistsLoggingLevel()abstract StringgetTypeConverterStatisticsEnabled()abstract StringgetUseBreadcrumb()abstract StringgetUseDataType()abstract StringgetUseMDCLogging()abstract org.apache.camel.model.validator.ValidatorsDefinitiongetValidators()protected abstract voidinitBeanPostProcessor(T context)protected voidinitCamelContext(T context)Initializes the contextprotected abstract voidinitCustomRegistry(T context)protected voidinitJMXAgent()protected voidinitPropertyPlaceholder()protected voidinitRestRefs()protected voidinitRouteConfigurationRefs()protected voidinitRouteController()protected voidinitRouteRefs()protected voidinitRouteTemplateRefs()protected voidinitStreamCachingStrategy()protected voidinitThreadPoolProfiles(T context)protected voidinstallRoutes()Strategy to install all available routes into the contextbooleanisSingleton()protected abstract voidpostProcessBeforeInit(org.apache.camel.builder.RouteBuilder builder)abstract voidsetContextScan(org.apache.camel.model.ContextScanDefinition contextScan)abstract voidsetPackageScan(org.apache.camel.model.PackageScanDefinition packageScan)protected voidsetupRoutes()Setup all the routes which must be done prior startingCamelContext.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
isSingleton
public boolean isSingleton()
-
getContextClassLoaderOnStart
public ClassLoader getContextClassLoaderOnStart()
-
setupRoutes
protected void setupRoutes() throws ExceptionSetup all the routes which must be done prior startingCamelContext.- Throws:
Exception
-
initCustomRegistry
protected abstract void initCustomRegistry(T context)
-
initStreamCachingStrategy
protected void initStreamCachingStrategy() throws Exception- Throws:
Exception
-
initRouteConfigurationRefs
protected void initRouteConfigurationRefs() throws Exception- Throws:
Exception
-
getBeanForType
protected abstract <S> S getBeanForType(Class<S> clazz)
-
getContext
public T getContext()
-
getContext
public abstract T getContext(boolean create)
-
getRouteTemplates
public abstract List<org.apache.camel.model.RouteTemplateDefinition> getRouteTemplates()
- Specified by:
getRouteTemplatesin interfaceorg.apache.camel.model.RouteTemplateContainer
-
getRouteConfigurations
public abstract List<org.apache.camel.model.RouteConfigurationDefinition> getRouteConfigurations()
- Specified by:
getRouteConfigurationsin interfaceorg.apache.camel.model.RouteConfigurationContainer
-
getRoutes
public abstract List<org.apache.camel.model.RouteDefinition> getRoutes()
- Specified by:
getRoutesin interfaceorg.apache.camel.model.RouteContainer
-
getRests
public abstract List<org.apache.camel.model.rest.RestDefinition> getRests()
- Specified by:
getRestsin interfaceorg.apache.camel.model.rest.RestContainer
-
getRestConfiguration
public abstract org.apache.camel.model.rest.RestConfigurationDefinition getRestConfiguration()
-
getEndpoints
public abstract List<? extends AbstractCamelEndpointFactoryBean> getEndpoints()
-
getRedeliveryPolicies
public abstract List<? extends AbstractCamelRedeliveryPolicyFactoryBean> getRedeliveryPolicies()
-
getIntercepts
public abstract List<org.apache.camel.model.InterceptDefinition> getIntercepts()
-
getInterceptFroms
public abstract List<org.apache.camel.model.InterceptFromDefinition> getInterceptFroms()
-
getInterceptSendToEndpoints
public abstract List<org.apache.camel.model.InterceptSendToEndpointDefinition> getInterceptSendToEndpoints()
-
getGlobalOptions
public abstract org.apache.camel.model.GlobalOptionsDefinition getGlobalOptions()
-
getPackages
public abstract String[] getPackages()
-
getPackageScan
public abstract org.apache.camel.model.PackageScanDefinition getPackageScan()
-
setPackageScan
public abstract void setPackageScan(org.apache.camel.model.PackageScanDefinition packageScan)
-
getContextScan
public abstract org.apache.camel.model.ContextScanDefinition getContextScan()
-
setContextScan
public abstract void setContextScan(org.apache.camel.model.ContextScanDefinition contextScan)
-
getCamelPropertyPlaceholder
public abstract CamelPropertyPlaceholderDefinition getCamelPropertyPlaceholder()
-
getStartupSummaryLevel
public abstract org.apache.camel.StartupSummaryLevel getStartupSummaryLevel()
-
getTrace
public abstract String getTrace()
-
getTracePattern
public abstract String getTracePattern()
-
getTraceLoggingFormat
public abstract String getTraceLoggingFormat()
-
getBacklogTrace
public abstract String getBacklogTrace()
-
getDebug
public abstract String getDebug()
-
getMessageHistory
public abstract String getMessageHistory()
-
getSourceLocationEnabled
public abstract String getSourceLocationEnabled()
-
getLogMask
public abstract String getLogMask()
-
getLogExhaustedMessageBody
public abstract String getLogExhaustedMessageBody()
-
getStreamCache
public abstract String getStreamCache()
-
getDelayer
public abstract String getDelayer()
-
getAutoStartup
public abstract String getAutoStartup()
-
getUseMDCLogging
public abstract String getUseMDCLogging()
-
getMDCLoggingKeysPattern
public abstract String getMDCLoggingKeysPattern()
-
getDumpRoutes
public abstract String getDumpRoutes()
-
getUseDataType
public abstract String getUseDataType()
-
getUseBreadcrumb
public abstract String getUseBreadcrumb()
-
getBeanPostProcessorEnabled
public abstract String getBeanPostProcessorEnabled()
-
getAllowUseOriginalMessage
public abstract String getAllowUseOriginalMessage()
-
getCaseInsensitiveHeaders
public abstract String getCaseInsensitiveHeaders()
-
getAutowiredEnabled
public abstract String getAutowiredEnabled()
-
getRuntimeEndpointRegistryEnabled
public abstract String getRuntimeEndpointRegistryEnabled()
-
getManagementNamePattern
public abstract String getManagementNamePattern()
-
getThreadNamePattern
public abstract String getThreadNamePattern()
-
getLoadTypeConverters
public abstract String getLoadTypeConverters()
-
getLoadHealthChecks
public abstract String getLoadHealthChecks()
-
getInflightRepositoryBrowseEnabled
public abstract String getInflightRepositoryBrowseEnabled()
-
getTypeConverterStatisticsEnabled
public abstract String getTypeConverterStatisticsEnabled()
-
getTypeConverterExistsLoggingLevel
public abstract org.apache.camel.LoggingLevel getTypeConverterExistsLoggingLevel()
-
getTypeConverterExists
public abstract org.apache.camel.TypeConverterExists getTypeConverterExists()
-
getCamelJMXAgent
public abstract CamelJMXAgentDefinition getCamelJMXAgent()
-
getCamelStreamCachingStrategy
public abstract CamelStreamCachingStrategyDefinition getCamelStreamCachingStrategy()
-
getCamelRouteController
public abstract CamelRouteControllerDefinition getCamelRouteController()
-
getRouteConfigurationRefs
public abstract List<org.apache.camel.model.RouteConfigurationContextRefDefinition> getRouteConfigurationRefs()
-
getBuilderRefs
public abstract List<org.apache.camel.model.RouteBuilderDefinition> getBuilderRefs()
-
getRouteRefs
public abstract List<org.apache.camel.model.RouteContextRefDefinition> getRouteRefs()
-
getRouteTemplateRefs
public abstract List<org.apache.camel.model.RouteTemplateContextRefDefinition> getRouteTemplateRefs()
-
getRestRefs
public abstract List<org.apache.camel.model.RestContextRefDefinition> getRestRefs()
-
getErrorHandlerRef
public abstract String getErrorHandlerRef()
-
getDataFormats
public abstract org.apache.camel.model.dataformat.DataFormatsDefinition getDataFormats()
-
getTransformers
public abstract org.apache.camel.model.transformer.TransformersDefinition getTransformers()
-
getValidators
public abstract org.apache.camel.model.validator.ValidatorsDefinition getValidators()
-
getOnExceptions
public abstract List<org.apache.camel.model.OnExceptionDefinition> getOnExceptions()
-
getOnCompletions
public abstract List<org.apache.camel.model.OnCompletionDefinition> getOnCompletions()
-
getShutdownRoute
public abstract org.apache.camel.ShutdownRoute getShutdownRoute()
-
getShutdownRunningTask
public abstract org.apache.camel.ShutdownRunningTask getShutdownRunningTask()
-
getThreadPoolProfiles
public abstract List<org.apache.camel.model.ThreadPoolProfileDefinition> getThreadPoolProfiles()
-
getDependsOn
public abstract String getDependsOn()
-
getBeansFactory
public abstract List<AbstractCamelFactoryBean<?>> getBeansFactory()
-
getBeans
public abstract List<?> getBeans()
-
getDefaultServiceCallConfiguration
public abstract org.apache.camel.model.cloud.ServiceCallConfigurationDefinition getDefaultServiceCallConfiguration()
-
getServiceCallConfigurations
public abstract List<org.apache.camel.model.cloud.ServiceCallConfigurationDefinition> getServiceCallConfigurations()
-
getDefaultHystrixConfiguration
public abstract org.apache.camel.model.HystrixConfigurationDefinition getDefaultHystrixConfiguration()
-
getHystrixConfigurations
public abstract List<org.apache.camel.model.HystrixConfigurationDefinition> getHystrixConfigurations()
-
getDefaultResilience4jConfiguration
public abstract org.apache.camel.model.Resilience4jConfigurationDefinition getDefaultResilience4jConfiguration()
-
getResilience4jConfigurations
public abstract List<org.apache.camel.model.Resilience4jConfigurationDefinition> getResilience4jConfigurations()
-
getDefaultFaultToleranceConfiguration
public abstract org.apache.camel.model.FaultToleranceConfigurationDefinition getDefaultFaultToleranceConfiguration()
-
getFaultToleranceConfigurations
public abstract List<org.apache.camel.model.FaultToleranceConfigurationDefinition> getFaultToleranceConfigurations()
-
initCamelContext
protected void initCamelContext(T context) throws Exception
Initializes the context- Parameters:
context- the context- Throws:
Exception- is thrown if error occurred
-
initThreadPoolProfiles
protected void initThreadPoolProfiles(T context) throws Exception
- Throws:
Exception
-
initBeanPostProcessor
protected abstract void initBeanPostProcessor(T context)
-
installRoutes
protected void installRoutes() throws ExceptionStrategy to install all available routes into the context- Throws:
Exception
-
postProcessBeforeInit
protected abstract void postProcessBeforeInit(org.apache.camel.builder.RouteBuilder builder)
-
findRouteBuilders
protected void findRouteBuilders() throws ExceptionStrategy method to try findRouteBuilderinstances on the classpath- Throws:
Exception
-
findRouteBuildersByPackageScan
protected abstract void findRouteBuildersByPackageScan(String[] packages, org.apache.camel.spi.PackageScanFilter filter, List<org.apache.camel.RoutesBuilder> builders) throws Exception
- Throws:
Exception
-
-