public abstract class AbstractCamelContextFactoryBean<T extends org.apache.camel.model.ModelCamelContext>
extends org.apache.camel.model.IdentifiedType
implements org.apache.camel.model.RouteContainer, org.apache.camel.model.rest.RestContainer
CamelContext
and install routes either explicitly configured
or found by searching the classpath for Java classes which extend
RouteBuilder
.Modifier and Type | Field and Description |
---|---|
static String |
LAZY_LOAD_TYPE_CONVERTERS
JVM system property to control lazy loading of type converters.
|
Constructor and Description |
---|
AbstractCamelContextFactoryBean() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
void |
destroy() |
protected void |
findRouteBuilders()
Strategy method to try find
RouteBuilder instances on the classpath |
protected 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() |
protected abstract <S> S |
getBeanForType(Class<S> clazz) |
abstract List<org.apache.camel.model.RouteBuilderDefinition> |
getBuilderRefs() |
abstract CamelJMXAgentDefinition |
getCamelJMXAgent() |
abstract CamelPropertyPlaceholderDefinition |
getCamelPropertyPlaceholder() |
abstract CamelStreamCachingStrategyDefinition |
getCamelStreamCachingStrategy() |
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 |
getDelayer() |
abstract String |
getDependsOn() |
abstract List<? extends AbstractCamelEndpointFactoryBean> |
getEndpoints() |
abstract String |
getErrorHandlerRef() |
abstract String |
getHandleFault() |
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 Boolean |
getLazyLoadTypeConverters()
Deprecated.
this option is no longer supported, will be removed in a future Camel release.
|
abstract String |
getLogExhaustedMessageBody() |
abstract String |
getManagementNamePattern() |
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 org.apache.camel.model.PropertiesDefinition |
getProperties() |
abstract List<? extends AbstractCamelRedeliveryPolicyFactoryBean> |
getRedeliveryPolicies() |
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.RouteContextRefDefinition> |
getRouteRefs() |
abstract List<org.apache.camel.model.RouteDefinition> |
getRoutes() |
abstract String |
getRuntimeEndpointRegistryEnabled() |
abstract org.apache.camel.ShutdownRoute |
getShutdownRoute() |
abstract org.apache.camel.ShutdownRunningTask |
getShutdownRunningTask() |
abstract String |
getStreamCache() |
abstract String |
getThreadNamePattern() |
abstract List<org.apache.camel.model.ThreadPoolProfileDefinition> |
getThreadPoolProfiles() |
abstract String |
getTrace() |
abstract org.apache.camel.TypeConverterExists |
getTypeConverterExists() |
abstract org.apache.camel.LoggingLevel |
getTypeConverterExistsLoggingLevel() |
abstract Boolean |
getTypeConverterStatisticsEnabled() |
abstract String |
getUseBreadcrumb() |
abstract String |
getUseMDCLogging() |
protected abstract void |
initBeanPostProcessor(T context) |
protected void |
initCamelContext(T ctx)
Initializes the context
|
protected abstract void |
initCustomRegistry(T context) |
protected void |
initJMXAgent() |
protected void |
initLazyLoadTypeConverters() |
protected void |
initPropertyPlaceholder() |
protected void |
initRestRefs() |
protected void |
initRouteRefs() |
protected void |
initStreamCachingStrategy() |
protected void |
initThreadPoolProfiles(T context) |
protected void |
installRoutes()
Strategy to install all available routes into the context
|
boolean |
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 starting
CamelContext . |
public static final String LAZY_LOAD_TYPE_CONVERTERS
public boolean isSingleton()
public ClassLoader getContextClassLoaderOnStart()
protected void setupRoutes() throws Exception
CamelContext
.Exception
protected abstract void initCustomRegistry(T context)
protected void initLazyLoadTypeConverters()
protected void initStreamCachingStrategy() throws Exception
Exception
protected abstract <S> S getBeanForType(Class<S> clazz)
public T getContext()
public abstract T getContext(boolean create)
public abstract List<org.apache.camel.model.RouteDefinition> getRoutes()
getRoutes
in interface org.apache.camel.model.RouteContainer
public abstract List<org.apache.camel.model.rest.RestDefinition> getRests()
getRests
in interface org.apache.camel.model.rest.RestContainer
public abstract org.apache.camel.model.rest.RestConfigurationDefinition getRestConfiguration()
public abstract List<? extends AbstractCamelEndpointFactoryBean> getEndpoints()
public abstract List<? extends AbstractCamelRedeliveryPolicyFactoryBean> getRedeliveryPolicies()
public abstract List<org.apache.camel.model.InterceptDefinition> getIntercepts()
public abstract List<org.apache.camel.model.InterceptFromDefinition> getInterceptFroms()
public abstract List<org.apache.camel.model.InterceptSendToEndpointDefinition> getInterceptSendToEndpoints()
public abstract org.apache.camel.model.PropertiesDefinition getProperties()
public abstract String[] getPackages()
public abstract org.apache.camel.model.PackageScanDefinition getPackageScan()
public abstract void setPackageScan(org.apache.camel.model.PackageScanDefinition packageScan)
public abstract org.apache.camel.model.ContextScanDefinition getContextScan()
public abstract void setContextScan(org.apache.camel.model.ContextScanDefinition contextScan)
public abstract CamelPropertyPlaceholderDefinition getCamelPropertyPlaceholder()
public abstract String getTrace()
public abstract String getMessageHistory()
public abstract String getLogExhaustedMessageBody()
public abstract String getStreamCache()
public abstract String getDelayer()
public abstract String getHandleFault()
public abstract String getAutoStartup()
public abstract String getUseMDCLogging()
public abstract String getUseBreadcrumb()
public abstract String getAllowUseOriginalMessage()
public abstract String getRuntimeEndpointRegistryEnabled()
public abstract String getManagementNamePattern()
public abstract String getThreadNamePattern()
@Deprecated public abstract Boolean getLazyLoadTypeConverters()
public abstract Boolean getTypeConverterStatisticsEnabled()
public abstract org.apache.camel.LoggingLevel getTypeConverterExistsLoggingLevel()
public abstract org.apache.camel.TypeConverterExists getTypeConverterExists()
public abstract CamelJMXAgentDefinition getCamelJMXAgent()
public abstract CamelStreamCachingStrategyDefinition getCamelStreamCachingStrategy()
public abstract List<org.apache.camel.model.RouteBuilderDefinition> getBuilderRefs()
public abstract List<org.apache.camel.model.RouteContextRefDefinition> getRouteRefs()
public abstract List<org.apache.camel.model.RestContextRefDefinition> getRestRefs()
public abstract String getErrorHandlerRef()
public abstract org.apache.camel.model.dataformat.DataFormatsDefinition getDataFormats()
public abstract List<org.apache.camel.model.OnExceptionDefinition> getOnExceptions()
public abstract List<org.apache.camel.model.OnCompletionDefinition> getOnCompletions()
public abstract org.apache.camel.ShutdownRoute getShutdownRoute()
public abstract org.apache.camel.ShutdownRunningTask getShutdownRunningTask()
public abstract List<org.apache.camel.model.ThreadPoolProfileDefinition> getThreadPoolProfiles()
public abstract String getDependsOn()
protected void initCamelContext(T ctx) throws Exception
ctx
- the contextException
- is thrown if error occurredprotected void initThreadPoolProfiles(T context) throws Exception
Exception
protected abstract void initBeanPostProcessor(T context)
protected void installRoutes() throws Exception
Exception
protected abstract void postProcessBeforeInit(org.apache.camel.builder.RouteBuilder builder)
protected void findRouteBuilders() throws Exception
RouteBuilder
instances on the classpathException
protected abstract void findRouteBuildersByPackageScan(String[] packages, org.apache.camel.spi.PackageScanFilter filter, List<org.apache.camel.RoutesBuilder> builders) throws Exception
Exception
Apache Camel