Interface CamelContextLifecycle

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void build()
      Builds the CamelContext.
      void close()
      Closes (Shutdown) the CamelContext, which means it cannot be started again.
      ServiceStatus getStatus()
      Get the status of this CamelContext
      void init()
      Initializes the CamelContext.
      boolean isRunAllowed()
      Helper methods so the CamelContext knows if it should keep running.
      boolean isStarted()
      Whether the CamelContext is started
      boolean isStarting()
      Whether the CamelContext is starting
      boolean isStopped()
      Whether the CamelContext is stopped
      boolean isStopping()
      Whether the CamelContext is stopping
      boolean isSuspended()
      Whether the CamelContext is suspended
      boolean isSuspending()
      Whether the CamelContext is suspending
      void resume()
      Resumes the CamelContext.
      void shutdown()
      Shutdown the CamelContext, which means it cannot be started again.
      void start()
      Starts the CamelContext (important: the start method is not blocked, see more details in the Main documentation for running Camel Standalone).
      void stop()
      Stop and shutdown the CamelContext (will stop all routes/components/endpoints etc and clear internal state/cache).
      void suspend()
      Suspends the CamelContext.
    • Method Detail

      • start

        void start()
        Starts the CamelContext (important: the start method is not blocked, see more details in the Main documentation for running Camel Standalone).

        See more details at the class-level javadoc at CamelContext.

        Throws:
        RuntimeCamelException - is thrown if starting failed
      • stop

        void stop()
        Stop and shutdown the CamelContext (will stop all routes/components/endpoints etc and clear internal state/cache).

        See more details at the class-level javadoc at CamelContext.

        Throws:
        RuntimeCamelException - is thrown if stopping failed
      • isStarted

        boolean isStarted()
        Whether the CamelContext is started
        Returns:
        true if this CamelContext has been started
      • isStarting

        boolean isStarting()
        Whether the CamelContext is starting
        Returns:
        true if this CamelContext is being started
      • isStopping

        boolean isStopping()
        Whether the CamelContext is stopping
        Returns:
        true if this CamelContext is in the process of stopping
      • isStopped

        boolean isStopped()
        Whether the CamelContext is stopped
        Returns:
        true if this CamelContext is stopped
      • isSuspending

        boolean isSuspending()
        Whether the CamelContext is suspending
        Returns:
        true if this CamelContext is in the process of suspending
      • isSuspended

        boolean isSuspended()
        Whether the CamelContext is suspended
        Returns:
        true if this CamelContext is suspended
      • isRunAllowed

        boolean isRunAllowed()
        Helper methods so the CamelContext knows if it should keep running. Returns false if the CamelContext is being stopped or is stopped.
        Returns:
        true if the CamelContext should continue to run.
      • build

        void build()
        Builds the CamelContext. This phase is intended for frameworks or runtimes that are capable of performing build-time optimizations such as with camel-quarkus.
      • init

        void init()
        Initializes the CamelContext.
      • suspend

        void suspend()
        Suspends the CamelContext.
      • resume

        void resume()
        Resumes the CamelContext.
      • shutdown

        void shutdown()
        Shutdown the CamelContext, which means it cannot be started again.

        See more details at the class-level javadoc at CamelContext.

      • close

        void close()
            throws Exception
        Closes (Shutdown) the CamelContext, which means it cannot be started again.
        Specified by:
        close in interface AutoCloseable
        Throws:
        Exception - is thrown if shutdown failed
      • getStatus

        ServiceStatus getStatus()
        Get the status of this CamelContext
        Returns:
        the status