Class AppLifecycleHandler
java.lang.Object
org.summerboot.jexpress.boot.event.AppLifecycleHandler
- All Implemented Interfaces:
AppLifecycleListener
- Author:
- Changski Tie Zheng Zhang 张铁铮, 魏泽北, 杜旺财, 杜富贵
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final org.apache.logging.log4j.Loggerprotected PostOffice -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonApplicationStart(String appVersion, String fullConfigInfo) voidonApplicationStatusUpdated(boolean healthOk, boolean paused, boolean serviceStatusChanged, String reason) called when application paused or resumed by configuration/pause file or BottController's ${context-root}/status?voidonApplicationStop(String appVersion) voidonConfigChangeBefore(File configFile, JExpressConfig cfg) voidonConfigChangedAfter(File configFile, JExpressConfig cfg, Throwable ex) voidonHealthInspectionFailed(boolean healthOk, boolean paused, long retryIndex, int nextInspectionIntervalSeconds)
-
Field Details
-
log
protected static final org.apache.logging.log4j.Logger log -
postOffice
-
-
Constructor Details
-
AppLifecycleHandler
public AppLifecycleHandler()
-
-
Method Details
-
onApplicationStart
- Specified by:
onApplicationStartin interfaceAppLifecycleListener
-
onApplicationStop
- Specified by:
onApplicationStopin interfaceAppLifecycleListener
-
onApplicationStatusUpdated
public void onApplicationStatusUpdated(boolean healthOk, boolean paused, boolean serviceStatusChanged, String reason) called when application paused or resumed by configuration/pause file or BottController's ${context-root}/status?pause=true|false- Specified by:
onApplicationStatusUpdatedin interfaceAppLifecycleListener- Parameters:
healthOk-paused-serviceStatusChanged-reason-
-
onHealthInspectionFailed
public void onHealthInspectionFailed(boolean healthOk, boolean paused, long retryIndex, int nextInspectionIntervalSeconds) - Specified by:
onHealthInspectionFailedin interfaceAppLifecycleListener
-
onConfigChangeBefore
- Specified by:
onConfigChangeBeforein interfaceAppLifecycleListener
-
onConfigChangedAfter
- Specified by:
onConfigChangedAfterin interfaceAppLifecycleListener
-