org.apache.camel.blueprint
Class CamelContextFactoryBean

java.lang.Object
  extended by org.apache.camel.model.IdentifiedType
      extended by org.apache.camel.core.xml.AbstractCamelContextFactoryBean<BlueprintCamelContext>
          extended by org.apache.camel.blueprint.CamelContextFactoryBean
All Implemented Interfaces:
RouteContainer

public class CamelContextFactoryBean
extends AbstractCamelContextFactoryBean<BlueprintCamelContext>

A bean to create and initialize a BlueprintCamelContext and install routes either explicitly configured in Blueprint XML or found by searching the classpath for Java classes which extend RouteBuilder using the nested setPackages(String[]).

Version:
$Revision: 21959 $

Constructor Summary
CamelContextFactoryBean()
           
 
Method Summary
protected  BlueprintCamelContext createContext()
           
protected  void findRouteBuildersByContextScan(PackageScanFilter filter, List<RoutesBuilder> builders)
           
protected  void findRouteBuildersByPackageScan(String[] packages, PackageScanFilter filter, List<RoutesBuilder> builders)
           
 String getAutoStartup()
           
protected
<S> S
getBeanForType(Class<S> clazz)
           
 List getBeans()
           
 List<RouteBuilderDefinition> getBuilderRefs()
           
 CamelJMXAgentDefinition getCamelJMXAgent()
           
 CamelPropertyPlaceholderDefinition getCamelPropertyPlaceholder()
           
 BlueprintCamelContext getContext(boolean create)
           
 ClassLoader getContextClassLoaderOnStart()
           
 ContextScanDefinition getContextScan()
           
 DataFormatsDefinition getDataFormats()
           
 String getDelayer()
           
 String getDependsOn()
           
 List<CamelEndpointFactoryBean> getEndpoints()
           
 String getErrorHandlerRef()
           
 String getHandleFault()
           
 List<InterceptFromDefinition> getInterceptFroms()
           
 List<InterceptDefinition> getIntercepts()
           
 List<InterceptSendToEndpointDefinition> getInterceptSendToEndpoints()
           
 Boolean getLazyLoadTypeConverters()
           
 Class getObjectType()
           
 List<OnCompletionDefinition> getOnCompletions()
           
 List<OnExceptionDefinition> getOnExceptions()
           
 String[] getPackages()
           
 PackageScanDefinition getPackageScan()
           
 PropertiesDefinition getProperties()
           
 List<RouteContextRefDefinition> getRouteRefs()
           
 List<RouteDefinition> getRoutes()
          Returns the routes
 ShutdownRoute getShutdownRoute()
           
 ShutdownRunningTask getShutdownRunningTask()
           
 String getStreamCache()
           
 List<ThreadPoolProfileDefinition> getThreadPoolProfiles()
           
 List<CamelThreadPoolFactoryBean> getThreadPools()
           
 String getTrace()
           
protected  void initBeanPostProcessor(BlueprintCamelContext context)
           
protected  void initCustomRegistry(BlueprintCamelContext context)
           
 boolean isImplicitId()
           
protected  void postProcessBeforeInit(RouteBuilder builder)
           
 void setAutoStartup(String autoStartup)
           
 void setBeans(List beans)
           
 void setBlueprintContainer(org.osgi.service.blueprint.container.BlueprintContainer blueprintContainer)
           
 void setBuilderRefs(List<RouteBuilderDefinition> builderRefs)
           
 void setBundleContext(org.osgi.framework.BundleContext bundleContext)
           
 void setCamelJMXAgent(CamelJMXAgentDefinition camelJMXAgent)
           
 void setCamelPropertyPlaceholder(CamelPropertyPlaceholderDefinition camelPropertyPlaceholder)
           
 void setContextScan(ContextScanDefinition contextScan)
           
 void setDataFormats(DataFormatsDefinition dataFormats)
           
 void setDelayer(String delayer)
           
 void setDependsOn(String dependsOn)
           
 void setEndpoints(List<CamelEndpointFactoryBean> endpoints)
           
 void setErrorHandlerRef(String errorHandlerRef)
           
 void setHandleFault(String handleFault)
           
 void setImplicitId(boolean flag)
           
 void setInterceptFroms(List<InterceptFromDefinition> interceptFroms)
           
 void setIntercepts(List<InterceptDefinition> intercepts)
           
 void setInterceptSendToEndpoints(List<InterceptSendToEndpointDefinition> interceptSendToEndpoints)
           
 void setLazyLoadTypeConverters(Boolean lazyLoadTypeConverters)
           
 void setOnCompletions(List<OnCompletionDefinition> onCompletions)
           
 void setOnExceptions(List<OnExceptionDefinition> onExceptions)
           
 void setPackages(String[] packages)
           
 void setPackageScan(PackageScanDefinition packageScan)
           
 void setProperties(PropertiesDefinition properties)
           
 void setRouteRefs(List<RouteContextRefDefinition> routeRefs)
           
 void setRoutes(List<RouteDefinition> routes)
          Sets the routes to use
 void setShutdownRoute(ShutdownRoute shutdownRoute)
           
 void setShutdownRunningTask(ShutdownRunningTask shutdownRunningTask)
           
 void setStreamCache(String streamCache)
           
 void setThreadPoolProfiles(List<ThreadPoolProfileDefinition> threadPoolProfiles)
           
 void setThreadPools(List<CamelThreadPoolFactoryBean> threadPools)
           
 void setTrace(String trace)
           
 
Methods inherited from class org.apache.camel.core.xml.AbstractCamelContextFactoryBean
afterPropertiesSet, destroy, findRouteBuilders, getContext, getObject, initCamelContext, installRoutes, isSingleton
 
Methods inherited from class org.apache.camel.model.IdentifiedType
getId, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CamelContextFactoryBean

public CamelContextFactoryBean()
Method Detail

getObjectType

public Class getObjectType()
Overrides:
getObjectType in class AbstractCamelContextFactoryBean<BlueprintCamelContext>

getContext

public BlueprintCamelContext getContext(boolean create)
Specified by:
getContext in class AbstractCamelContextFactoryBean<BlueprintCamelContext>

setBlueprintContainer

public void setBlueprintContainer(org.osgi.service.blueprint.container.BlueprintContainer blueprintContainer)

setBundleContext

public void setBundleContext(org.osgi.framework.BundleContext bundleContext)

createContext

protected BlueprintCamelContext createContext()

initCustomRegistry

protected void initCustomRegistry(BlueprintCamelContext context)
Specified by:
initCustomRegistry in class AbstractCamelContextFactoryBean<BlueprintCamelContext>

getBeanForType

protected <S> S getBeanForType(Class<S> clazz)
Specified by:
getBeanForType in class AbstractCamelContextFactoryBean<BlueprintCamelContext>

initBeanPostProcessor

protected void initBeanPostProcessor(BlueprintCamelContext context)
Specified by:
initBeanPostProcessor in class AbstractCamelContextFactoryBean<BlueprintCamelContext>

postProcessBeforeInit

protected void postProcessBeforeInit(RouteBuilder builder)
Specified by:
postProcessBeforeInit in class AbstractCamelContextFactoryBean<BlueprintCamelContext>

findRouteBuildersByPackageScan

protected void findRouteBuildersByPackageScan(String[] packages,
                                              PackageScanFilter filter,
                                              List<RoutesBuilder> builders)
                                       throws Exception
Specified by:
findRouteBuildersByPackageScan in class AbstractCamelContextFactoryBean<BlueprintCamelContext>
Throws:
Exception

findRouteBuildersByContextScan

protected void findRouteBuildersByContextScan(PackageScanFilter filter,
                                              List<RoutesBuilder> builders)
                                       throws Exception
Specified by:
findRouteBuildersByContextScan in class AbstractCamelContextFactoryBean<BlueprintCamelContext>
Throws:
Exception

getDependsOn

public String getDependsOn()
Specified by:
getDependsOn in class AbstractCamelContextFactoryBean<BlueprintCamelContext>

setDependsOn

public void setDependsOn(String dependsOn)

getAutoStartup

public String getAutoStartup()
Specified by:
getAutoStartup in class AbstractCamelContextFactoryBean<BlueprintCamelContext>

setAutoStartup

public void setAutoStartup(String autoStartup)

getLazyLoadTypeConverters

public Boolean getLazyLoadTypeConverters()
Specified by:
getLazyLoadTypeConverters in class AbstractCamelContextFactoryBean<BlueprintCamelContext>

setLazyLoadTypeConverters

public void setLazyLoadTypeConverters(Boolean lazyLoadTypeConverters)

getShutdownRoute

public ShutdownRoute getShutdownRoute()
Specified by:
getShutdownRoute in class AbstractCamelContextFactoryBean<BlueprintCamelContext>

setShutdownRoute

public void setShutdownRoute(ShutdownRoute shutdownRoute)

getShutdownRunningTask

public ShutdownRunningTask getShutdownRunningTask()
Specified by:
getShutdownRunningTask in class AbstractCamelContextFactoryBean<BlueprintCamelContext>

setShutdownRunningTask

public void setShutdownRunningTask(ShutdownRunningTask shutdownRunningTask)

getCamelPropertyPlaceholder

public CamelPropertyPlaceholderDefinition getCamelPropertyPlaceholder()
Specified by:
getCamelPropertyPlaceholder in class AbstractCamelContextFactoryBean<BlueprintCamelContext>

setCamelPropertyPlaceholder

public void setCamelPropertyPlaceholder(CamelPropertyPlaceholderDefinition camelPropertyPlaceholder)

getRouteRefs

public List<RouteContextRefDefinition> getRouteRefs()
Specified by:
getRouteRefs in class AbstractCamelContextFactoryBean<BlueprintCamelContext>

setRouteRefs

public void setRouteRefs(List<RouteContextRefDefinition> routeRefs)

getThreadPoolProfiles

public List<ThreadPoolProfileDefinition> getThreadPoolProfiles()
Specified by:
getThreadPoolProfiles in class AbstractCamelContextFactoryBean<BlueprintCamelContext>

setThreadPoolProfiles

public void setThreadPoolProfiles(List<ThreadPoolProfileDefinition> threadPoolProfiles)

getThreadPools

public List<CamelThreadPoolFactoryBean> getThreadPools()

setThreadPools

public void setThreadPools(List<CamelThreadPoolFactoryBean> threadPools)

getTrace

public String getTrace()
Specified by:
getTrace in class AbstractCamelContextFactoryBean<BlueprintCamelContext>

setTrace

public void setTrace(String trace)

getStreamCache

public String getStreamCache()
Specified by:
getStreamCache in class AbstractCamelContextFactoryBean<BlueprintCamelContext>

setStreamCache

public void setStreamCache(String streamCache)

getDelayer

public String getDelayer()
Specified by:
getDelayer in class AbstractCamelContextFactoryBean<BlueprintCamelContext>

setDelayer

public void setDelayer(String delayer)

getHandleFault

public String getHandleFault()
Specified by:
getHandleFault in class AbstractCamelContextFactoryBean<BlueprintCamelContext>

setHandleFault

public void setHandleFault(String handleFault)

getErrorHandlerRef

public String getErrorHandlerRef()
Specified by:
getErrorHandlerRef in class AbstractCamelContextFactoryBean<BlueprintCamelContext>

setErrorHandlerRef

public void setErrorHandlerRef(String errorHandlerRef)

getProperties

public PropertiesDefinition getProperties()
Specified by:
getProperties in class AbstractCamelContextFactoryBean<BlueprintCamelContext>

setProperties

public void setProperties(PropertiesDefinition properties)

getPackages

public String[] getPackages()
Specified by:
getPackages in class AbstractCamelContextFactoryBean<BlueprintCamelContext>

setPackages

public void setPackages(String[] packages)

getPackageScan

public PackageScanDefinition getPackageScan()
Specified by:
getPackageScan in class AbstractCamelContextFactoryBean<BlueprintCamelContext>

setPackageScan

public void setPackageScan(PackageScanDefinition packageScan)
Specified by:
setPackageScan in class AbstractCamelContextFactoryBean<BlueprintCamelContext>

getContextScan

public ContextScanDefinition getContextScan()
Specified by:
getContextScan in class AbstractCamelContextFactoryBean<BlueprintCamelContext>

setContextScan

public void setContextScan(ContextScanDefinition contextScan)
Specified by:
setContextScan in class AbstractCamelContextFactoryBean<BlueprintCamelContext>

getCamelJMXAgent

public CamelJMXAgentDefinition getCamelJMXAgent()
Specified by:
getCamelJMXAgent in class AbstractCamelContextFactoryBean<BlueprintCamelContext>

setCamelJMXAgent

public void setCamelJMXAgent(CamelJMXAgentDefinition camelJMXAgent)

getBeans

public List getBeans()

setBeans

public void setBeans(List beans)

getBuilderRefs

public List<RouteBuilderDefinition> getBuilderRefs()
Specified by:
getBuilderRefs in class AbstractCamelContextFactoryBean<BlueprintCamelContext>

setBuilderRefs

public void setBuilderRefs(List<RouteBuilderDefinition> builderRefs)

getEndpoints

public List<CamelEndpointFactoryBean> getEndpoints()

setEndpoints

public void setEndpoints(List<CamelEndpointFactoryBean> endpoints)

getDataFormats

public DataFormatsDefinition getDataFormats()
Specified by:
getDataFormats in class AbstractCamelContextFactoryBean<BlueprintCamelContext>

setDataFormats

public void setDataFormats(DataFormatsDefinition dataFormats)

getOnExceptions

public List<OnExceptionDefinition> getOnExceptions()
Specified by:
getOnExceptions in class AbstractCamelContextFactoryBean<BlueprintCamelContext>

setOnExceptions

public void setOnExceptions(List<OnExceptionDefinition> onExceptions)

getOnCompletions

public List<OnCompletionDefinition> getOnCompletions()
Specified by:
getOnCompletions in class AbstractCamelContextFactoryBean<BlueprintCamelContext>

setOnCompletions

public void setOnCompletions(List<OnCompletionDefinition> onCompletions)

getIntercepts

public List<InterceptDefinition> getIntercepts()
Specified by:
getIntercepts in class AbstractCamelContextFactoryBean<BlueprintCamelContext>

setIntercepts

public void setIntercepts(List<InterceptDefinition> intercepts)

getInterceptFroms

public List<InterceptFromDefinition> getInterceptFroms()
Specified by:
getInterceptFroms in class AbstractCamelContextFactoryBean<BlueprintCamelContext>

setInterceptFroms

public void setInterceptFroms(List<InterceptFromDefinition> interceptFroms)

getInterceptSendToEndpoints

public List<InterceptSendToEndpointDefinition> getInterceptSendToEndpoints()
Specified by:
getInterceptSendToEndpoints in class AbstractCamelContextFactoryBean<BlueprintCamelContext>

setInterceptSendToEndpoints

public void setInterceptSendToEndpoints(List<InterceptSendToEndpointDefinition> interceptSendToEndpoints)

getRoutes

public List<RouteDefinition> getRoutes()
Description copied from interface: RouteContainer
Returns the routes

Specified by:
getRoutes in interface RouteContainer
Specified by:
getRoutes in class AbstractCamelContextFactoryBean<BlueprintCamelContext>
Returns:
the routes

setRoutes

public void setRoutes(List<RouteDefinition> routes)
Description copied from interface: RouteContainer
Sets the routes to use

Parameters:
routes - the routes

getContextClassLoaderOnStart

public ClassLoader getContextClassLoaderOnStart()
Overrides:
getContextClassLoaderOnStart in class AbstractCamelContextFactoryBean<BlueprintCamelContext>

isImplicitId

public boolean isImplicitId()

setImplicitId

public void setImplicitId(boolean flag)


Apache CAMEL