|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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()
|
void |
destroy()
|
protected void |
findRouteBuiders()
Strategy method to try find RouteBuilder instances on the classpath |
org.springframework.context.ApplicationContext |
getApplicationContext()
|
org.apache.camel.CamelContext |
getContext()
|
Object |
getObject()
|
Class |
getObjectType()
|
String[] |
getPackages()
|
org.apache.camel.builder.RouteBuilder |
getRouteBuilder()
|
protected void |
installRoutes()
Strategy to install all available routes into the context |
boolean |
isSingleton()
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
|
void |
setContext(org.apache.camel.CamelContext context)
|
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 |
setRouteBuilder(org.apache.camel.builder.RouteBuilder routeBuilder)
Set a single RouteBuilder to be used to create the default routes on startup |
void |
setRouteBuilders(org.apache.camel.builder.RouteBuilder[] builders)
Set a collection of RouteBuilder instances to be used to create the default routes on startup |
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 org.springframework.beans.factory.FactoryBean
Exception
public Class getObjectType()
getObjectType
in interface org.springframework.beans.factory.FactoryBean
public boolean isSingleton()
isSingleton
in interface org.springframework.beans.factory.FactoryBean
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
public void destroy() throws Exception
destroy
in interface org.springframework.beans.factory.DisposableBean
Exception
public org.apache.camel.CamelContext getContext() throws Exception
Exception
public void setContext(org.apache.camel.CamelContext context)
public org.apache.camel.builder.RouteBuilder getRouteBuilder()
public void setRouteBuilder(org.apache.camel.builder.RouteBuilder routeBuilder)
RouteBuilder
to be used to create the default routes on startup
public void setRouteBuilders(org.apache.camel.builder.RouteBuilder[] builders)
RouteBuilder
instances to be used to create the default routes on startup
public org.springframework.context.ApplicationContext getApplicationContext()
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
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 searchedprotected void installRoutes() throws Exception
Exception
protected void findRouteBuiders() throws IllegalAccessException, InstantiationException
RouteBuilder
instances on the classpath
IllegalAccessException
InstantiationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |