Interface Managed<T>

Type Parameters:
T - managed type
All Superinterfaces:
AutoCloseable

public interface Managed<T> extends AutoCloseable
Interface for types that can be asynchronously started and stopped.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
     
    boolean
    Returns a boolean value indicating whether the managed object is running.
    Starts the managed object.
    Stops the managed object.
  • Method Details

    • start

      Starts the managed object.
      Returns:
      A completable future to be completed once the object has been started.
    • isRunning

      boolean isRunning()
      Returns a boolean value indicating whether the managed object is running.
      Returns:
      Indicates whether the managed object is running.
    • stop

      Stops the managed object.
      Returns:
      A completable future to be completed once the object has been stopped.
    • close

      default void close() throws Exception
      Specified by:
      close in interface AutoCloseable
      Throws:
      Exception