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.
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorsConstructorDescriptionCamelSpringBootApplicationListener
(org.springframework.context.ApplicationContext applicationContext, List<CamelContextConfiguration> camelContextConfigurations, CamelConfigurationProperties configurationProperties, org.apache.camel.main.RoutesCollector springBootRoutesCollector) -
Method Summary
Modifier and TypeMethodDescriptionint
getOrder()
void
onApplicationEvent
(org.springframework.context.event.ContextRefreshedEvent event) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.context.ApplicationListener
supportsAsyncExecution
-
Constructor Details
-
CamelSpringBootApplicationListener
public CamelSpringBootApplicationListener(org.springframework.context.ApplicationContext applicationContext, List<CamelContextConfiguration> camelContextConfigurations, CamelConfigurationProperties configurationProperties, org.apache.camel.main.RoutesCollector springBootRoutesCollector)
-
-
Method Details
-
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
-