Class 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 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 interface org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
      • getOrder

        public int getOrder()
        Specified by:
        getOrder in interface org.springframework.core.Ordered