|
||||||||||
| 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()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
protected SpringCamelContext |
createContext()
Create the context |
protected ResolverUtil |
createResolverUtil()
The factory method for create the ResolverUtil |
void |
destroy()
|
protected void |
findRouteBuilders()
Strategy method to try find RouteBuilder instances on the
classpath |
List<Routes> |
getAdditionalBuilders()
|
ApplicationContext |
getApplicationContext()
|
BeanPostProcessor |
getBeanPostProcessor()
|
List<RouteBuilderRef> |
getBuilderRefs()
|
CamelJMXAgentType |
getCamelJMXAgent()
|
SpringCamelContext |
getContext()
|
ClassLoader |
getContextClassLoaderOnStart()
|
DataFormatsType |
getDataFormats()
|
Long |
getDelay()
|
String |
getErrorHandlerRef()
|
List<InterceptType> |
getIntercepts()
|
Object |
getObject()
|
Class |
getObjectType()
|
String[] |
getPackages()
|
PropertiesType |
getProperties()
|
RouteBuilder |
getRouteBuilder()
|
List<RouteType> |
getRoutes()
|
Boolean |
getShouldStartContext()
|
Boolean |
getTrace()
|
Boolean |
getUseJmx()
Deprecated. Please the jmxAgent element instead. Will be removed in Camel 2.0. |
protected void |
installRoutes()
Strategy to install all available routes into the context |
boolean |
isJmxEnabled()
Deprecated. Please the jmxAgent element instead. Will be removed in Camel 2.0. |
boolean |
isSingleton()
|
void |
onApplicationEvent(ApplicationEvent event)
|
void |
setApplicationContext(ApplicationContext applicationContext)
|
void |
setAutowireRouteBuilders(Boolean autowireRouteBuilders)
If enabled this will force all RouteBuilder classes configured in the Spring
ApplicationContext to be registered automatically with this CamelContext. |
void |
setBeanPostProcessor(BeanPostProcessor postProcessor)
|
void |
setBuilderRefs(List<RouteBuilderRef> builderRefs)
|
void |
setCamelJMXAgent(CamelJMXAgentType agent)
|
void |
setContext(SpringCamelContext context)
|
void |
setDataFormats(DataFormatsType dataFormats)
|
void |
setDelay(Long delay)
|
void |
setErrorHandlerRef(String errorHandlerRef)
Sets the name of the error handler object used to default the error handling strategy |
void |
setIntercepts(List<InterceptType> intercepts)
|
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
SpringCamelContext as a route. |
void |
setProperties(PropertiesType properties)
|
void |
setRouteBuilder(RouteBuilder routeBuilder)
Set a single RouteBuilder to be used to create the default routes
on startup |
void |
setRouteBuilders(RouteBuilder[] builders)
Set a collection of RouteBuilder instances to be used to create
the default routes on startup |
void |
setRoutes(List<RouteType> routes)
|
void |
setShouldStartContext(Boolean shouldStartContext)
|
void |
setTrace(Boolean trace)
|
void |
setUseJmx(Boolean useJmx)
Deprecated. Please the jmxAgent element instead. Will be removed in Camel 2.0. |
| 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 FactoryBeanExceptionpublic Class getObjectType()
getObjectType in interface FactoryBeanpublic boolean isSingleton()
isSingleton in interface FactoryBeanpublic ClassLoader getContextClassLoaderOnStart()
public List<Routes> getAdditionalBuilders()
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface InitializingBeanException
public void destroy()
throws Exception
destroy in interface DisposableBeanExceptionpublic void onApplicationEvent(ApplicationEvent event)
onApplicationEvent in interface ApplicationListener
public SpringCamelContext getContext()
throws Exception
Exceptionpublic void setContext(SpringCamelContext context)
public List<RouteType> getRoutes()
getRoutes in interface RouteContainerpublic void setRoutes(List<RouteType> routes)
setRoutes in interface RouteContainerpublic List<InterceptType> getIntercepts()
public void setIntercepts(List<InterceptType> intercepts)
public RouteBuilder getRouteBuilder()
public void setRouteBuilder(RouteBuilder routeBuilder)
RouteBuilder to be used to create the default routes
on startup
public void setRouteBuilders(RouteBuilder[] builders)
RouteBuilder instances to be used to create
the default routes on startup
public ApplicationContext getApplicationContext()
public void setApplicationContext(ApplicationContext applicationContext)
setApplicationContext in interface ApplicationContextAwarepublic PropertiesType getProperties()
public void setProperties(PropertiesType 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
packages - the package names which are recursively searchedpublic void setBeanPostProcessor(BeanPostProcessor postProcessor)
public BeanPostProcessor getBeanPostProcessor()
public boolean isJmxEnabled()
public Boolean getUseJmx()
public void setUseJmx(Boolean useJmx)
public void setCamelJMXAgent(CamelJMXAgentType agent)
public Boolean getTrace()
public void setTrace(Boolean trace)
public Long getDelay()
public void setDelay(Long delay)
public CamelJMXAgentType getCamelJMXAgent()
public List<RouteBuilderRef> getBuilderRefs()
public void setBuilderRefs(List<RouteBuilderRef> builderRefs)
public void setAutowireRouteBuilders(Boolean autowireRouteBuilders)
RouteBuilder classes configured in the Spring
ApplicationContext to be registered automatically with this CamelContext.
public String getErrorHandlerRef()
public void setErrorHandlerRef(String errorHandlerRef)
errorHandlerRef - the Spring bean ref of the error handlerpublic Boolean getShouldStartContext()
public void setShouldStartContext(Boolean shouldStartContext)
protected SpringCamelContext createContext()
protected void installRoutes()
throws Exception
Exception
protected void findRouteBuilders()
throws Exception,
InstantiationException
RouteBuilder instances on the
classpath
Exception
InstantiationExceptionprotected ResolverUtil createResolverUtil()
public void setDataFormats(DataFormatsType dataFormats)
public DataFormatsType getDataFormats()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||