|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.camel.model.IdentifiedType
org.apache.camel.spring.CamelContextFactoryBean
public class CamelContextFactoryBean
A Spring 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 Summary | |
---|---|
CamelContextFactoryBean()
|
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 |
---|
public CamelContextFactoryBean()
Method Detail |
---|
public Object getObject() throws Exception
getObject
in interface FactoryBean
Exception
public Class getObjectType()
getObjectType
in interface FactoryBean
public boolean isSingleton()
isSingleton
in interface FactoryBean
public ClassLoader getContextClassLoaderOnStart()
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
public void destroy() throws Exception
destroy
in interface DisposableBean
Exception
public void onApplicationEvent(ApplicationEvent event)
onApplicationEvent
in interface ApplicationListener
public SpringCamelContext getContext() throws Exception
Exception
public void setContext(SpringCamelContext context)
public List<RouteDefinition> getRoutes()
getRoutes
in interface RouteContainer
public void setRoutes(List<RouteDefinition> routes)
setRoutes
in interface RouteContainer
public List<InterceptDefinition> getIntercepts()
public void setIntercepts(List<InterceptDefinition> intercepts)
public List<InterceptFromDefinition> getInterceptFroms()
public void setInterceptFroms(List<InterceptFromDefinition> interceptFroms)
public List<InterceptSendToEndpointDefinition> getInterceptSendToEndpoints()
public void setInterceptSendToEndpoints(List<InterceptSendToEndpointDefinition> interceptSendToEndpoints)
public ApplicationContext getApplicationContext()
public void setApplicationContext(ApplicationContext applicationContext)
setApplicationContext
in interface ApplicationContextAware
public PropertiesDefinition getProperties()
public void setProperties(PropertiesDefinition properties)
public String[] getPackages()
public void setPackages(String[] packages)
RouteBuilder
to be auto-wired up to the
SpringCamelContext
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 PackageScanDefinition getPackageScan()
public void setPackageScan(PackageScanDefinition packageScan)
RouteBuilder
implementations
packageScan
- the package scanpublic CamelPropertyPlaceholderDefinition getCamelPropertyPlaceholder()
public void setCamelPropertyPlaceholder(CamelPropertyPlaceholderDefinition camelPropertyPlaceholder)
public void setBeanPostProcessor(BeanPostProcessor postProcessor)
public BeanPostProcessor getBeanPostProcessor()
public void setCamelJMXAgent(CamelJMXAgentDefinition agent)
public String getTrace()
public void setTrace(String trace)
public String getStreamCache()
public void setStreamCache(String streamCache)
public String getDelayer()
public void setDelayer(String delayer)
public String getHandleFault()
public void setHandleFault(String handleFault)
public String getAutoStartup()
public void setAutoStartup(String autoStartup)
public CamelJMXAgentDefinition getCamelJMXAgent()
public List<RouteBuilderDefinition> getBuilderRefs()
public void setBuilderRefs(List<RouteBuilderDefinition> builderRefs)
public List<RouteContextRefDefinition> getRouteRefs()
public void setRouteRefs(List<RouteContextRefDefinition> routeRefs)
public String getErrorHandlerRef()
public void setErrorHandlerRef(String errorHandlerRef)
errorHandlerRef
- the Spring bean ref of the error handlerpublic void setDataFormats(DataFormatsDefinition dataFormats)
public DataFormatsDefinition getDataFormats()
public void setOnExceptions(List<OnExceptionDefinition> onExceptions)
public List<OnExceptionDefinition> getOnExceptions()
public List<OnCompletionDefinition> getOnCompletions()
public void setOnCompletions(List<OnCompletionDefinition> onCompletions)
public ShutdownRoute getShutdownRoute()
public void setShutdownRoute(ShutdownRoute shutdownRoute)
public ShutdownRunningTask getShutdownRunningTask()
public void setShutdownRunningTask(ShutdownRunningTask shutdownRunningTask)
public List<ThreadPoolProfileDefinition> getThreadPoolProfiles()
public void setThreadPoolProfiles(List<ThreadPoolProfileDefinition> threadPoolProfiles)
public String getDependsOn()
public void setDependsOn(String dependsOn)
protected SpringCamelContext createContext()
protected void initSpringCamelContext(SpringCamelContext ctx) throws Exception
ctx
- the context
Exception
- is thrown if error occurredprotected SpringCamelContext newCamelContext()
protected void installRoutes() throws Exception
Exception
protected void findRouteBuilders() throws Exception
RouteBuilder
instances on the classpath
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |