Interface LifeCycle<T extends LifeCycle>

    • Method Detail

      • isRunning

        boolean isRunning()
        Returns:
        Whether the component is running
      • start

        @NonNull
        default T start()
        Starts the lifecyle component.
        Returns:
        This lifecycle component
      • stop

        @NonNull
        default T stop()
        Stops the life cycle component.
        Returns:
        This lifecycle component
      • close

        default void close()
        Delegates to stop().
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
      • refresh

        @NonNull
        default T refresh()
        Refreshes the current life cycle object. Effectively this calls stop() followed by start().
        Returns:
        This lifecycle component