Interface IStartStop

  • All Superinterfaces:
    IInstantiable
    All Known Implementing Classes:
    CommonStartStop, LifecycleWatchdog

    public interface IStartStop
    extends IInstantiable
    This describes the components ability to explicitly start or stop its lifecycle. This is an alternative and more detailed description than supported by IStartable and should be preferred.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean isStarted()
      Answer true if this object is started
      void start()
      Start the component lifecycle.
      void stop()
      Stop the component lifecycle.
      boolean stopRequested​(java.util.Set visited)
      Ask the component if it agrees to end its lifecycle at the very moment.
    • Method Detail

      • isStarted

        boolean isStarted()
        Answer true if this object is started
        Returns:
        Answer true if this object is started.
      • start

        void start()
        Start the component lifecycle. A RuntimeException is expected when starting the component fails.
      • stop

        void stop()
        Stop the component lifecycle. All resources should be freed. A RuntimeException is expected when stopping the component fails.
      • stopRequested

        boolean stopRequested​(java.util.Set visited)
        Ask the component if it agrees to end its lifecycle at the very moment. The component may deny this request, but it must be prepared anyway to be stopped.
        Parameters:
        visited - The optional set of already visited objects in the stop request cycle.