Package org.apache.camel.spring.boot
Class CamelSpringBootApplicationListener
- java.lang.Object
-
- org.apache.camel.spring.boot.CamelSpringBootApplicationListener
-
- All Implemented Interfaces:
EventListener
,org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
,org.springframework.core.Ordered
public class CamelSpringBootApplicationListener extends Object implements org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>, org.springframework.core.Ordered
A spring application listener that when spring boot is starting (refresh event) will setup Camel by:1. collecting routes and rests from the various sources (like Spring application context beans registry or opinionated classpath locations) and injects these into the Camel context. 2. setting up Camel main controller if enabled. 3. setting up run duration if in use.
-
-
Constructor Summary
Constructors Constructor Description CamelSpringBootApplicationListener(org.springframework.context.ApplicationContext applicationContext, List<CamelContextConfiguration> camelContextConfigurations, CamelConfigurationProperties configurationProperties, org.apache.camel.main.RoutesCollector springBootRoutesCollector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getOrder()
void
onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event)
-
-
-
Constructor Detail
-
CamelSpringBootApplicationListener
public CamelSpringBootApplicationListener(org.springframework.context.ApplicationContext applicationContext, List<CamelContextConfiguration> camelContextConfigurations, CamelConfigurationProperties configurationProperties, org.apache.camel.main.RoutesCollector springBootRoutesCollector)
-
-
Method Detail
-
onApplicationEvent
public void onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event)
- Specified by:
onApplicationEvent
in interfaceorg.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
-
getOrder
public int getOrder()
- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
-
-