org.apache.camel.core.xml
Class AbstractCamelContextFactoryBean<T extends CamelContext>

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

public abstract class AbstractCamelContextFactoryBean<T extends CamelContext>
extends IdentifiedType
implements RouteContainer

A factory to create and initialize a CamelContext and install routes either explicitly configured or found by searching the classpath for Java classes which extend RouteBuilder.

Version:
$Revision: 938746 $

Constructor Summary
AbstractCamelContextFactoryBean()
           
 
Method Summary
 void afterPropertiesSet()
           
 void destroy()
           
protected  void findRouteBuilders()
          Strategy method to try find RouteBuilder instances on the classpath
protected abstract  void findRouteBuildersByContextScan(PackageScanFilter filter, List<RoutesBuilder> builders)
           
protected abstract  void findRouteBuildersByPackageScan(String[] packages, PackageScanFilter filter, List<RoutesBuilder> builders)
           
abstract  String getAutoStartup()
           
protected abstract
<S> S
getBeanForType(Class<S> clazz)
           
abstract  List<RouteBuilderDefinition> getBuilderRefs()
           
abstract  CamelJMXAgentDefinition getCamelJMXAgent()
           
abstract  CamelPropertyPlaceholderDefinition getCamelPropertyPlaceholder()
           
 T getContext()
           
abstract  T getContext(boolean create)
           
 ClassLoader getContextClassLoaderOnStart()
           
abstract  ContextScanDefinition getContextScan()
           
abstract  DataFormatsDefinition getDataFormats()
           
abstract  String getDelayer()
           
abstract  String getDependsOn()
           
abstract  String getErrorHandlerRef()
           
abstract  String getHandleFault()
           
abstract  List<InterceptFromDefinition> getInterceptFroms()
           
abstract  List<InterceptDefinition> getIntercepts()
           
abstract  List<InterceptSendToEndpointDefinition> getInterceptSendToEndpoints()
           
 Object getObject()
           
 Class getObjectType()
           
abstract  List<OnCompletionDefinition> getOnCompletions()
           
abstract  List<OnExceptionDefinition> getOnExceptions()
           
abstract  String[] getPackages()
           
abstract  PackageScanDefinition getPackageScan()
           
abstract  PropertiesDefinition getProperties()
           
abstract  List<RouteContextRefDefinition> getRouteRefs()
           
abstract  List<RouteDefinition> getRoutes()
           
abstract  ShutdownRoute getShutdownRoute()
           
abstract  ShutdownRunningTask getShutdownRunningTask()
           
abstract  String getStreamCache()
           
abstract  List<ThreadPoolProfileDefinition> getThreadPoolProfiles()
           
abstract  String getTrace()
           
protected abstract  void initBeanPostProcessor(T context)
           
protected  void initCamelContext(T ctx)
          Initializes the context
protected abstract  void initCustomRegistry(T context)
           
protected  void installRoutes()
          Strategy to install all available routes into the context
 boolean isSingleton()
           
protected abstract  void postProcessBeforeInit(RouteBuilder builder)
           
abstract  void setContextScan(ContextScanDefinition contextScan)
           
abstract  void setPackageScan(PackageScanDefinition packageScan)
           
 
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
 
Methods inherited from interface org.apache.camel.model.RouteContainer
setRoutes
 

Constructor Detail

AbstractCamelContextFactoryBean

public AbstractCamelContextFactoryBean()
Method Detail

getObject

public Object getObject()
                 throws Exception
Throws:
Exception

getObjectType

public Class getObjectType()

isSingleton

public boolean isSingleton()

getContextClassLoaderOnStart

public ClassLoader getContextClassLoaderOnStart()

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Throws:
Exception

initCustomRegistry

protected abstract void initCustomRegistry(T context)

getBeanForType

protected abstract <S> S getBeanForType(Class<S> clazz)

destroy

public void destroy()
             throws Exception
Throws:
Exception

getContext

public T getContext()

getContext

public abstract T getContext(boolean create)

getRoutes

public abstract List<RouteDefinition> getRoutes()
Specified by:
getRoutes in interface RouteContainer

getIntercepts

public abstract List<InterceptDefinition> getIntercepts()

getInterceptFroms

public abstract List<InterceptFromDefinition> getInterceptFroms()

getInterceptSendToEndpoints

public abstract List<InterceptSendToEndpointDefinition> getInterceptSendToEndpoints()

getProperties

public abstract PropertiesDefinition getProperties()

getPackages

public abstract String[] getPackages()

getPackageScan

public abstract PackageScanDefinition getPackageScan()

setPackageScan

public abstract void setPackageScan(PackageScanDefinition packageScan)

getContextScan

public abstract ContextScanDefinition getContextScan()

setContextScan

public abstract void setContextScan(ContextScanDefinition contextScan)

getCamelPropertyPlaceholder

public abstract CamelPropertyPlaceholderDefinition getCamelPropertyPlaceholder()

getTrace

public abstract String getTrace()

getStreamCache

public abstract String getStreamCache()

getDelayer

public abstract String getDelayer()

getHandleFault

public abstract String getHandleFault()

getAutoStartup

public abstract String getAutoStartup()

getCamelJMXAgent

public abstract CamelJMXAgentDefinition getCamelJMXAgent()

getBuilderRefs

public abstract List<RouteBuilderDefinition> getBuilderRefs()

getRouteRefs

public abstract List<RouteContextRefDefinition> getRouteRefs()

getErrorHandlerRef

public abstract String getErrorHandlerRef()

getDataFormats

public abstract DataFormatsDefinition getDataFormats()

getOnExceptions

public abstract List<OnExceptionDefinition> getOnExceptions()

getOnCompletions

public abstract List<OnCompletionDefinition> getOnCompletions()

getShutdownRoute

public abstract ShutdownRoute getShutdownRoute()

getShutdownRunningTask

public abstract ShutdownRunningTask getShutdownRunningTask()

getThreadPoolProfiles

public abstract List<ThreadPoolProfileDefinition> getThreadPoolProfiles()

getDependsOn

public abstract String getDependsOn()

initCamelContext

protected void initCamelContext(T ctx)
                         throws Exception
Initializes the context

Parameters:
ctx - the context
Throws:
Exception - is thrown if error occurred

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(RouteBuilder builder)

findRouteBuilders

protected void findRouteBuilders()
                          throws Exception
Strategy method to try find RouteBuilder instances on the classpath

Throws:
Exception

findRouteBuildersByPackageScan

protected abstract void findRouteBuildersByPackageScan(String[] packages,
                                                       PackageScanFilter filter,
                                                       List<RoutesBuilder> builders)
                                                throws Exception
Throws:
Exception

findRouteBuildersByContextScan

protected abstract void findRouteBuildersByContextScan(PackageScanFilter filter,
                                                       List<RoutesBuilder> builders)
                                                throws Exception
Throws:
Exception


Copyright © 2007-2010 The Apache Software Foundation. All Rights Reserved.