Interface StartupConditionStrategy

All Superinterfaces:
AutoCloseable, Service, StaticService

public interface StartupConditionStrategy extends StaticService
Strategy for performing checks on startup that can validate whether Camel can be started, or wait for some conditions to be satisfied, before Camel can continue to startup.
See Also:
  • Method Details

    • isEnabled

      boolean isEnabled()
      To enable or disable startup checks
    • setEnabled

      void setEnabled(boolean enabled)
      To enable or disable startup checks
    • setInterval

      void setInterval(int interval)
      Interval in millis between checking startup conditions
    • getInterval

      int getInterval()
      Interval in millis between checking startup conditions
    • setTimeout

      void setTimeout(int timeout)
      Total timeout in millis when performing startup checks.
    • getTimeout

      int getTimeout()
      Total timeout in millis when performing startup checks.
    • getOnTimeout

      String getOnTimeout()
      What action, to do on timeout. fail = do not startup, and throw an exception causing camel to fail stop = do not startup, and stop camel ignore = log a WARN and continue to startup
    • setOnTimeout

      void setOnTimeout(String onTimeout)
      What action, to do on timeout. fail = do not startup, and throw an exception causing camel to fail stop = do not startup, and stop camel ignore = log a WARN and continue to startup
    • addStartupCondition

      void addStartupCondition(StartupCondition startupCondition)
      Adds a custom StartupCondition check to be performed.
    • addStartupConditions

      void addStartupConditions(String classNames)
      A list of custom class names (FQN) for StartupCondition classes. Multiple classes can be separated by comma.
    • getStartupConditions

      List<StartupCondition> getStartupConditions()
      Lists all the StartupCondition.
    • checkStartupConditions

      void checkStartupConditions() throws Exception
      Checks all StartupCondition whether they are satisfied. If everything is okay, then this method returns, otherwise if a condition is failing then an exception is thrown.
      Throws:
      Exception