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 java.lang.Object implements org.springframework.context.SmartLifecycle
The abstract class forSmartLifecycle
- Since:
- 1.0.0
- Author:
- Mercy
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_PHASE
Compatible withSmartLifecycle.DEFAULT_PHASE
before Spring Framework 5.1static int
EARLIEST_PHASE
The earliest phasestatic int
LATEST_PHASE
The latest phase
-
Constructor Summary
Constructors Constructor Description AbstractSmartLifecycle()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
doStart()
protected abstract void
doStop()
int
getPhase()
boolean
isAutoStartup()
boolean
isRunning()
boolean
isStarted()
void
setPhase(int phase)
protected void
setStarted(boolean started)
void
start()
void
stop()
void
stop(java.lang.Runnable callback)
-
-
-
Field Detail
-
EARLIEST_PHASE
public static final int EARLIEST_PHASE
The earliest phase- See Also:
- Constant Field Values
-
LATEST_PHASE
public static final int LATEST_PHASE
The latest phase- See Also:
- Constant Field Values
-
DEFAULT_PHASE
public static final int DEFAULT_PHASE
Compatible withSmartLifecycle.DEFAULT_PHASE
before Spring Framework 5.1- See Also:
SmartLifecycle.DEFAULT_PHASE
, Constant Field Values
-
-
Method Detail
-
start
public final void start()
- Specified by:
start
in interfaceorg.springframework.context.Lifecycle
-
doStart
protected abstract void doStart()
-
stop
public final void stop()
- Specified by:
stop
in interfaceorg.springframework.context.Lifecycle
-
doStop
protected abstract void doStop()
-
isRunning
public final boolean isRunning()
- Specified by:
isRunning
in interfaceorg.springframework.context.Lifecycle
-
isAutoStartup
public boolean isAutoStartup()
- Specified by:
isAutoStartup
in interfaceorg.springframework.context.SmartLifecycle
-
stop
public void stop(java.lang.Runnable callback)
- Specified by:
stop
in interfaceorg.springframework.context.SmartLifecycle
-
getPhase
public final int getPhase()
- Specified by:
getPhase
in interfaceorg.springframework.context.Phased
- Specified by:
getPhase
in interfaceorg.springframework.context.SmartLifecycle
-
isStarted
public boolean isStarted()
-
setPhase
public final void setPhase(int phase)
-
setStarted
protected void setStarted(boolean started)
-
-