Interface MainListener

All Known Implementing Classes:
MainListenerSupport

public interface MainListener
A lifecycle listener to receive callbacks when the Main is started and stopped. Beware that if you use MainListener then depending on how Camel is started and these main listener is configured then the beforeInitialize and beforeConfigure events may already have been triggered. So depending on your use-cases then favour using the later stage events to trigger your code.
  • Method Details

    • beforeInitialize

      void beforeInitialize(BaseMainSupport main)
      Callback invoked after the CamelContext has been created and before the auto-configured step starts.
      Parameters:
      main - the main instance
    • beforeConfigure

      void beforeConfigure(BaseMainSupport main)
      Callback invoked after the CamelContext has been created and before the auto-configured step starts.
      Parameters:
      main - the main instance
    • afterConfigure

      void afterConfigure(BaseMainSupport main)
      Callback to configure the created CamelContext.
      Parameters:
      main - the main instance
    • beforeStart

      void beforeStart(BaseMainSupport main)
      Callback before the CamelContext is being created and started.
      Parameters:
      main - the main instance
    • afterStart

      void afterStart(BaseMainSupport main)
      Callback after the CamelContext has been started.
      Parameters:
      main - the main instance
    • beforeStop

      void beforeStop(BaseMainSupport main)
      Callback before the CamelContext is being stopped.
      Parameters:
      main - the main instance
    • afterStop

      void afterStop(BaseMainSupport main)
      Callback after the CamelContext has been stopped.
      Parameters:
      main - the main instance