public class CamelContextFactoryBean extends org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext> implements org.springframework.beans.factory.FactoryBean<SpringCamelContext>, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>
FactoryBean
to create and initialize a
SpringCamelContext
and install routes either explicitly configured in
Spring XML or found by searching the classpath for Java classes which extend
RouteBuilder
using the nested setPackages(String[])
.Constructor and Description |
---|
CamelContextFactoryBean() |
Modifier and Type | Method and Description |
---|---|
protected SpringCamelContext |
createContext()
Create the context
|
protected void |
findRouteBuildersByContextScan(org.apache.camel.spi.PackageScanFilter filter,
List<org.apache.camel.RoutesBuilder> builders) |
protected void |
findRouteBuildersByPackageScan(String[] packages,
org.apache.camel.spi.PackageScanFilter filter,
List<org.apache.camel.RoutesBuilder> builders) |
org.springframework.context.ApplicationContext |
getApplicationContext() |
String |
getAutoStartup() |
protected <S> S |
getBeanForType(Class<S> clazz) |
org.springframework.beans.factory.config.BeanPostProcessor |
getBeanPostProcessor() |
List<org.apache.camel.model.RouteBuilderDefinition> |
getBuilderRefs() |
org.apache.camel.core.xml.CamelJMXAgentDefinition |
getCamelJMXAgent() |
org.apache.camel.core.xml.CamelPropertyPlaceholderDefinition |
getCamelPropertyPlaceholder() |
SpringCamelContext |
getContext(boolean create) |
org.apache.camel.model.ContextScanDefinition |
getContextScan() |
org.apache.camel.model.dataformat.DataFormatsDefinition |
getDataFormats() |
String |
getDelayer() |
String |
getDependsOn() |
List<CamelEndpointFactoryBean> |
getEndpoints() |
String |
getErrorHandlerRef() |
String |
getHandleFault() |
List<org.apache.camel.model.InterceptFromDefinition> |
getInterceptFroms() |
List<org.apache.camel.model.InterceptDefinition> |
getIntercepts() |
List<org.apache.camel.model.InterceptSendToEndpointDefinition> |
getInterceptSendToEndpoints() |
Boolean |
getLazyLoadTypeConverters()
Deprecated.
|
String |
getManagementNamePattern() |
Class<SpringCamelContext> |
getObjectType() |
List<org.apache.camel.model.OnCompletionDefinition> |
getOnCompletions() |
List<org.apache.camel.model.OnExceptionDefinition> |
getOnExceptions() |
String[] |
getPackages() |
org.apache.camel.model.PackageScanDefinition |
getPackageScan() |
org.apache.camel.model.config.PropertiesDefinition |
getProperties() |
List<CamelRedeliveryPolicyFactoryBean> |
getRedeliveryPolicies() |
List<org.apache.camel.model.RouteContextRefDefinition> |
getRouteRefs() |
List<org.apache.camel.model.RouteDefinition> |
getRoutes() |
org.apache.camel.ShutdownRoute |
getShutdownRoute() |
org.apache.camel.ShutdownRunningTask |
getShutdownRunningTask() |
String |
getStreamCache() |
String |
getThreadNamePattern() |
List<org.apache.camel.model.ThreadPoolProfileDefinition> |
getThreadPoolProfiles() |
String |
getTrace() |
Boolean |
getTypeConverterStatisticsEnabled() |
String |
getUseBreadcrumb() |
String |
getUseMDCLogging() |
protected void |
initBeanPostProcessor(SpringCamelContext context) |
protected void |
initCustomRegistry(SpringCamelContext context) |
protected void |
initPropertyPlaceholder() |
boolean |
isImplicitId() |
protected SpringCamelContext |
newCamelContext() |
void |
onApplicationEvent(org.springframework.context.ApplicationEvent event) |
protected void |
postProcessBeforeInit(org.apache.camel.builder.RouteBuilder builder) |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setAutoStartup(String autoStartup) |
void |
setBeanPostProcessor(org.springframework.beans.factory.config.BeanPostProcessor postProcessor) |
void |
setBuilderRefs(List<org.apache.camel.model.RouteBuilderDefinition> builderRefs) |
void |
setCamelJMXAgent(org.apache.camel.core.xml.CamelJMXAgentDefinition agent) |
void |
setCamelPropertyPlaceholder(org.apache.camel.core.xml.CamelPropertyPlaceholderDefinition camelPropertyPlaceholder) |
void |
setContext(SpringCamelContext context) |
void |
setContextScan(org.apache.camel.model.ContextScanDefinition contextScan)
Sets the context scanning (eg Spring's ApplicationContext) information.
|
void |
setDataFormats(org.apache.camel.model.dataformat.DataFormatsDefinition dataFormats) |
void |
setDelayer(String delayer) |
void |
setDependsOn(String dependsOn) |
void |
setErrorHandlerRef(String errorHandlerRef)
Sets the name of the error handler object used to default the error handling strategy
|
void |
setHandleFault(String handleFault) |
void |
setImplicitId(boolean flag) |
void |
setInterceptFroms(List<org.apache.camel.model.InterceptFromDefinition> interceptFroms) |
void |
setIntercepts(List<org.apache.camel.model.InterceptDefinition> intercepts) |
void |
setInterceptSendToEndpoints(List<org.apache.camel.model.InterceptSendToEndpointDefinition> interceptSendToEndpoints) |
void |
setLazyLoadTypeConverters(Boolean lazyLoadTypeConverters)
Deprecated.
|
void |
setManagementNamePattern(String managementNamePattern) |
void |
setOnCompletions(List<org.apache.camel.model.OnCompletionDefinition> onCompletions) |
void |
setOnExceptions(List<org.apache.camel.model.OnExceptionDefinition> onExceptions) |
void |
setPackages(String[] packages)
Sets the package names to be recursively searched for Java classes which
extend
RouteBuilder to be auto-wired up to the
CamelContext as a route. |
void |
setPackageScan(org.apache.camel.model.PackageScanDefinition packageScan)
Sets the package scanning information.
|
void |
setProperties(org.apache.camel.model.config.PropertiesDefinition properties) |
void |
setRouteRefs(List<org.apache.camel.model.RouteContextRefDefinition> routeRefs) |
void |
setRoutes(List<org.apache.camel.model.RouteDefinition> routes) |
void |
setShutdownRoute(org.apache.camel.ShutdownRoute shutdownRoute) |
void |
setShutdownRunningTask(org.apache.camel.ShutdownRunningTask shutdownRunningTask) |
void |
setStreamCache(String streamCache) |
void |
setThreadNamePattern(String threadNamePattern) |
void |
setThreadPoolProfiles(List<org.apache.camel.model.ThreadPoolProfileDefinition> threadPoolProfiles) |
void |
setTrace(String trace) |
void |
setTypeConverterStatisticsEnabled(Boolean typeConverterStatisticsEnabled) |
void |
setUseBreadcrumb(String useBreadcrumb) |
void |
setUseMDCLogging(String useMDCLogging) |
afterPropertiesSet, destroy, findRouteBuilders, getContext, getContextClassLoaderOnStart, getObject, initCamelContext, initJMXAgent, initLazyLoadTypeConverteres, initRouteRefs, initThreadPoolProfiles, installRoutes, isSingleton
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getObject, isSingleton
public Class<SpringCamelContext> getObjectType()
getObjectType
in interface org.springframework.beans.factory.FactoryBean<SpringCamelContext>
getObjectType
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
protected <S> S getBeanForType(Class<S> clazz)
getBeanForType
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
protected void findRouteBuildersByPackageScan(String[] packages, org.apache.camel.spi.PackageScanFilter filter, List<org.apache.camel.RoutesBuilder> builders) throws Exception
findRouteBuildersByPackageScan
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
Exception
protected void findRouteBuildersByContextScan(org.apache.camel.spi.PackageScanFilter filter, List<org.apache.camel.RoutesBuilder> builders) throws Exception
findRouteBuildersByContextScan
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
Exception
protected void initBeanPostProcessor(SpringCamelContext context)
initBeanPostProcessor
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
protected void postProcessBeforeInit(org.apache.camel.builder.RouteBuilder builder)
postProcessBeforeInit
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
protected void initCustomRegistry(SpringCamelContext context)
initCustomRegistry
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
protected void initPropertyPlaceholder() throws Exception
initPropertyPlaceholder
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
Exception
public void onApplicationEvent(org.springframework.context.ApplicationEvent event)
onApplicationEvent
in interface org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>
public org.springframework.context.ApplicationContext getApplicationContext()
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
public void setBeanPostProcessor(org.springframework.beans.factory.config.BeanPostProcessor postProcessor)
public org.springframework.beans.factory.config.BeanPostProcessor getBeanPostProcessor()
protected SpringCamelContext createContext()
protected SpringCamelContext newCamelContext()
public SpringCamelContext getContext(boolean create)
getContext
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
public void setContext(SpringCamelContext context)
public List<org.apache.camel.model.RouteDefinition> getRoutes()
getRoutes
in interface org.apache.camel.model.RouteContainer
getRoutes
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
public void setRoutes(List<org.apache.camel.model.RouteDefinition> routes)
setRoutes
in interface org.apache.camel.model.RouteContainer
public List<CamelEndpointFactoryBean> getEndpoints()
getEndpoints
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
public List<CamelRedeliveryPolicyFactoryBean> getRedeliveryPolicies()
getRedeliveryPolicies
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
public List<org.apache.camel.model.InterceptDefinition> getIntercepts()
getIntercepts
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
public void setIntercepts(List<org.apache.camel.model.InterceptDefinition> intercepts)
public List<org.apache.camel.model.InterceptFromDefinition> getInterceptFroms()
getInterceptFroms
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
public void setInterceptFroms(List<org.apache.camel.model.InterceptFromDefinition> interceptFroms)
public List<org.apache.camel.model.InterceptSendToEndpointDefinition> getInterceptSendToEndpoints()
getInterceptSendToEndpoints
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
public void setInterceptSendToEndpoints(List<org.apache.camel.model.InterceptSendToEndpointDefinition> interceptSendToEndpoints)
public org.apache.camel.model.config.PropertiesDefinition getProperties()
getProperties
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
public void setProperties(org.apache.camel.model.config.PropertiesDefinition properties)
public String[] getPackages()
getPackages
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
public void setPackages(String[] packages)
RouteBuilder
to be auto-wired up to the
CamelContext
as a route. Note that classes are excluded if
they are specifically configured in the spring.xml
A more advanced configuration can be done using setPackageScan(org.apache.camel.model.PackageScanDefinition)
packages
- the package names which are recursively searchedsetPackageScan(org.apache.camel.model.PackageScanDefinition)
public org.apache.camel.model.PackageScanDefinition getPackageScan()
getPackageScan
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
public void setPackageScan(org.apache.camel.model.PackageScanDefinition packageScan)
RouteBuilder
implementationssetPackageScan
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
packageScan
- the package scanpublic org.apache.camel.model.ContextScanDefinition getContextScan()
getContextScan
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
public void setContextScan(org.apache.camel.model.ContextScanDefinition contextScan)
RouteBuilder
implementationssetContextScan
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
contextScan
- the context scanpublic org.apache.camel.core.xml.CamelPropertyPlaceholderDefinition getCamelPropertyPlaceholder()
getCamelPropertyPlaceholder
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
public void setCamelPropertyPlaceholder(org.apache.camel.core.xml.CamelPropertyPlaceholderDefinition camelPropertyPlaceholder)
public void setCamelJMXAgent(org.apache.camel.core.xml.CamelJMXAgentDefinition agent)
public String getTrace()
getTrace
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
public void setTrace(String trace)
public String getStreamCache()
getStreamCache
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
public void setStreamCache(String streamCache)
public String getDelayer()
getDelayer
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
public void setDelayer(String delayer)
public String getHandleFault()
getHandleFault
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
public void setHandleFault(String handleFault)
public String getAutoStartup()
getAutoStartup
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
public void setAutoStartup(String autoStartup)
public String getUseMDCLogging()
getUseMDCLogging
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
public void setUseMDCLogging(String useMDCLogging)
public String getUseBreadcrumb()
getUseBreadcrumb
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
public void setUseBreadcrumb(String useBreadcrumb)
public String getManagementNamePattern()
getManagementNamePattern
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
public void setManagementNamePattern(String managementNamePattern)
public String getThreadNamePattern()
getThreadNamePattern
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
public void setThreadNamePattern(String threadNamePattern)
@Deprecated public Boolean getLazyLoadTypeConverters()
getLazyLoadTypeConverters
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
@Deprecated public void setLazyLoadTypeConverters(Boolean lazyLoadTypeConverters)
public Boolean getTypeConverterStatisticsEnabled()
getTypeConverterStatisticsEnabled
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
public void setTypeConverterStatisticsEnabled(Boolean typeConverterStatisticsEnabled)
public org.apache.camel.core.xml.CamelJMXAgentDefinition getCamelJMXAgent()
getCamelJMXAgent
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
public List<org.apache.camel.model.RouteBuilderDefinition> getBuilderRefs()
getBuilderRefs
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
public void setBuilderRefs(List<org.apache.camel.model.RouteBuilderDefinition> builderRefs)
public List<org.apache.camel.model.RouteContextRefDefinition> getRouteRefs()
getRouteRefs
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
public void setRouteRefs(List<org.apache.camel.model.RouteContextRefDefinition> routeRefs)
public String getErrorHandlerRef()
getErrorHandlerRef
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
public void setErrorHandlerRef(String errorHandlerRef)
errorHandlerRef
- the Spring bean ref of the error handlerpublic void setDataFormats(org.apache.camel.model.dataformat.DataFormatsDefinition dataFormats)
public org.apache.camel.model.dataformat.DataFormatsDefinition getDataFormats()
getDataFormats
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
public void setOnExceptions(List<org.apache.camel.model.OnExceptionDefinition> onExceptions)
public List<org.apache.camel.model.OnExceptionDefinition> getOnExceptions()
getOnExceptions
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
public List<org.apache.camel.model.OnCompletionDefinition> getOnCompletions()
getOnCompletions
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
public void setOnCompletions(List<org.apache.camel.model.OnCompletionDefinition> onCompletions)
public org.apache.camel.ShutdownRoute getShutdownRoute()
getShutdownRoute
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
public void setShutdownRoute(org.apache.camel.ShutdownRoute shutdownRoute)
public org.apache.camel.ShutdownRunningTask getShutdownRunningTask()
getShutdownRunningTask
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
public void setShutdownRunningTask(org.apache.camel.ShutdownRunningTask shutdownRunningTask)
public List<org.apache.camel.model.ThreadPoolProfileDefinition> getThreadPoolProfiles()
getThreadPoolProfiles
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
public void setThreadPoolProfiles(List<org.apache.camel.model.ThreadPoolProfileDefinition> threadPoolProfiles)
public String getDependsOn()
getDependsOn
in class org.apache.camel.core.xml.AbstractCamelContextFactoryBean<SpringCamelContext>
public void setDependsOn(String dependsOn)
public boolean isImplicitId()
public void setImplicitId(boolean flag)
Apache Camel