Class LoggingSmartLifecycle
- java.lang.Object
-
- io.microsphere.spring.context.lifecycle.AbstractSmartLifecycle
-
- io.microsphere.spring.context.lifecycle.LoggingSmartLifecycle
-
- All Implemented Interfaces:
org.springframework.context.Lifecycle
,org.springframework.context.Phased
,org.springframework.context.SmartLifecycle
public class LoggingSmartLifecycle extends AbstractSmartLifecycle
ASmartLifecycle
implementation that logs lifecycle events for debugging and monitoring purposes.This class extends
AbstractSmartLifecycle
and provides logging capabilities for lifecycle methods such asdoStart()
anddoStop()
. The logging is performed using theLogger
interface provided by the MicroSphere logging framework.Example Usage
To use this class in a Spring application context, simply define it as a bean:
{@code
- Since:
- 1.0.0
- Author:
- Mercy
- See Also:
AbstractSmartLifecycle
,SmartLifecycle
,Logger
-
-
Field Summary
-
Fields inherited from class io.microsphere.spring.context.lifecycle.AbstractSmartLifecycle
DEFAULT_PHASE, EARLIEST_PHASE, LATEST_PHASE
-
-
Constructor Summary
Constructors Constructor Description LoggingSmartLifecycle()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doStart()
protected void
doStop()
-
Methods inherited from class io.microsphere.spring.context.lifecycle.AbstractSmartLifecycle
getPhase, isAutoStartup, isRunning, isStarted, setPhase, setStarted, start, stop, stop
-
-
-
-
Method Detail
-
doStart
protected void doStart()
- Specified by:
doStart
in classAbstractSmartLifecycle
-
doStop
protected void doStop()
- Specified by:
doStop
in classAbstractSmartLifecycle
-
-