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
,org.apache.camel.model.TemplatedRouteContainer
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.RestContainer, org.apache.camel.model.TemplatedRouteContainer
A factory to create and initialize aCamelContext
and 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 void
afterPropertiesSet()
void
destroy()
protected void
findRouteBuilders()
Strategy method to try findRouteBuilder
instances on the classpathprotected abstract void
findRouteBuildersByContextScan(org.apache.camel.spi.PackageScanFilter filter, boolean includeNonSingletons, List<org.apache.camel.RoutesBuilder> builders)
protected abstract void
findRouteBuildersByPackageScan(String[] packages, org.apache.camel.spi.PackageScanFilter filter, List<org.apache.camel.RoutesBuilder> builders)
abstract String
getAllowUseOriginalMessage()
abstract String
getAutoStartup()
abstract String
getAutowiredEnabled()
abstract String
getBacklogTrace()
protected abstract <S> S
getBeanForType(Class<S> clazz)
abstract String
getBeanPostProcessorEnabled()
abstract List<?>
getBeans()
abstract List<AbstractCamelFactoryBean<?>>
getBeansFactory()
abstract List<org.apache.camel.model.RouteBuilderDefinition>
getBuilderRefs()
abstract CamelJMXAgentDefinition
getCamelJMXAgent()
abstract CamelPropertyPlaceholderDefinition
getCamelPropertyPlaceholder()
abstract CamelRouteControllerDefinition
getCamelRouteController()
abstract CamelStreamCachingStrategyDefinition
getCamelStreamCachingStrategy()
abstract String
getCaseInsensitiveHeaders()
T
getContext()
abstract T
getContext(boolean create)
ClassLoader
getContextClassLoaderOnStart()
abstract org.apache.camel.model.ContextScanDefinition
getContextScan()
abstract org.apache.camel.model.dataformat.DataFormatsDefinition
getDataFormats()
abstract String
getDebug()
abstract org.apache.camel.model.FaultToleranceConfigurationDefinition
getDefaultFaultToleranceConfiguration()
abstract org.apache.camel.model.Resilience4jConfigurationDefinition
getDefaultResilience4jConfiguration()
abstract org.apache.camel.model.cloud.ServiceCallConfigurationDefinition
getDefaultServiceCallConfiguration()
abstract String
getDelayer()
abstract String
getDependsOn()
abstract String
getDumpRoutes()
abstract List<? extends AbstractCamelEndpointFactoryBean>
getEndpoints()
abstract String
getErrorHandlerRef()
abstract List<org.apache.camel.model.FaultToleranceConfigurationDefinition>
getFaultToleranceConfigurations()
abstract org.apache.camel.model.GlobalOptionsDefinition
getGlobalOptions()
abstract String
getInflightRepositoryBrowseEnabled()
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 String
getLoadHealthChecks()
abstract String
getLoadTypeConverters()
abstract String
getLogExhaustedMessageBody()
abstract String
getLogMask()
abstract String
getManagementNamePattern()
abstract String
getMDCLoggingKeysPattern()
abstract String
getMessageHistory()
T
getObject()
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.PackageScanDefinition
getPackageScan()
abstract List<? extends AbstractCamelRedeliveryPolicyFactoryBean>
getRedeliveryPolicies()
abstract List<org.apache.camel.model.Resilience4jConfigurationDefinition>
getResilience4jConfigurations()
abstract org.apache.camel.model.rest.RestConfigurationDefinition
getRestConfiguration()
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 String
getRuntimeEndpointRegistryEnabled()
abstract List<org.apache.camel.model.cloud.ServiceCallConfigurationDefinition>
getServiceCallConfigurations()
abstract org.apache.camel.ShutdownRoute
getShutdownRoute()
abstract org.apache.camel.ShutdownRunningTask
getShutdownRunningTask()
abstract String
getSourceLocationEnabled()
abstract org.apache.camel.StartupSummaryLevel
getStartupSummaryLevel()
abstract String
getStreamCache()
abstract List<org.apache.camel.model.TemplatedRouteDefinition>
getTemplatedRoutes()
abstract String
getThreadNamePattern()
abstract List<org.apache.camel.model.ThreadPoolProfileDefinition>
getThreadPoolProfiles()
abstract String
getTrace()
abstract String
getTraceLoggingFormat()
abstract String
getTracePattern()
abstract org.apache.camel.model.transformer.TransformersDefinition
getTransformers()
abstract org.apache.camel.TypeConverterExists
getTypeConverterExists()
abstract org.apache.camel.LoggingLevel
getTypeConverterExistsLoggingLevel()
abstract String
getTypeConverterStatisticsEnabled()
abstract String
getUseBreadcrumb()
abstract String
getUseDataType()
abstract String
getUseMDCLogging()
abstract org.apache.camel.model.validator.ValidatorsDefinition
getValidators()
protected abstract void
initBeanPostProcessor(T context)
protected void
initCamelContext(T context)
Initializes the contextprotected abstract void
initCustomRegistry(T context)
protected void
initJMXAgent()
protected void
initPropertyPlaceholder()
protected void
initRestRefs()
protected void
initRouteConfigurationRefs()
protected void
initRouteController()
protected void
initRouteRefs()
protected void
initRouteTemplateRefs()
protected void
initStreamCachingStrategy()
protected void
initThreadPoolProfiles(T context)
protected void
installRoutes()
Strategy to install all available routes into the contextboolean
isSingleton()
protected abstract void
postProcessBeforeInit(org.apache.camel.builder.RouteBuilder builder)
abstract void
setContextScan(org.apache.camel.model.ContextScanDefinition contextScan)
abstract void
setPackageScan(org.apache.camel.model.PackageScanDefinition packageScan)
protected void
setupRoutes()
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 Exception
Setup 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:
getRouteTemplates
in interfaceorg.apache.camel.model.RouteTemplateContainer
-
getTemplatedRoutes
public abstract List<org.apache.camel.model.TemplatedRouteDefinition> getTemplatedRoutes()
- Specified by:
getTemplatedRoutes
in interfaceorg.apache.camel.model.TemplatedRouteContainer
-
getRouteConfigurations
public abstract List<org.apache.camel.model.RouteConfigurationDefinition> getRouteConfigurations()
- Specified by:
getRouteConfigurations
in interfaceorg.apache.camel.model.RouteConfigurationContainer
-
getRoutes
public abstract List<org.apache.camel.model.RouteDefinition> getRoutes()
- Specified by:
getRoutes
in interfaceorg.apache.camel.model.RouteContainer
-
getRests
public abstract List<org.apache.camel.model.rest.RestDefinition> getRests()
- Specified by:
getRests
in 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()
-
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 Exception
Strategy 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 Exception
Strategy method to try findRouteBuilder
instances 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
-
-