Class AbstractSmartLifecycle

java.lang.Object
io.microsphere.spring.context.lifecycle.AbstractSmartLifecycle
All Implemented Interfaces:
org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle

public abstract class AbstractSmartLifecycle extends Object implements org.springframework.context.SmartLifecycle
The abstract class for SmartLifecycle
Since:
1.0.0
Author:
Mercy
  • Field Details

    • EARLIEST_PHASE

      public static final int EARLIEST_PHASE
      The earliest phase
      See Also:
    • LATEST_PHASE

      public static final int LATEST_PHASE
      The latest phase
      See Also:
    • DEFAULT_PHASE

      public static final int DEFAULT_PHASE
      Compatible with SmartLifecycle.DEFAULT_PHASE before Spring Framework 5.1
      See Also:
  • Constructor Details

    • AbstractSmartLifecycle

      public AbstractSmartLifecycle()
  • Method Details

    • start

      public final void start()
      Specified by:
      start in interface org.springframework.context.Lifecycle
    • doStart

      protected abstract void doStart()
    • stop

      public final void stop()
      Specified by:
      stop in interface org.springframework.context.Lifecycle
    • doStop

      protected abstract void doStop()
    • isRunning

      public final boolean isRunning()
      Specified by:
      isRunning in interface org.springframework.context.Lifecycle
    • isAutoStartup

      public boolean isAutoStartup()
      Specified by:
      isAutoStartup in interface org.springframework.context.SmartLifecycle
    • stop

      public void stop(Runnable callback)
      Specified by:
      stop in interface org.springframework.context.SmartLifecycle
    • getPhase

      public final int getPhase()
      Specified by:
      getPhase in interface org.springframework.context.Phased
      Specified by:
      getPhase in interface org.springframework.context.SmartLifecycle
    • isStarted

      public boolean isStarted()
    • setPhase

      public final void setPhase(int phase)
    • setStarted

      protected void setStarted(boolean started)