Class BootstrapManager
- java.lang.Object
-
- org.craftercms.studio.impl.v2.utils.spring.context.BootstrapManager
-
- All Implemented Interfaces:
SystemStatusProvider
public class BootstrapManager extends Object implements SystemStatusProvider
Central point to control the event-based bootstrap process.Note: All methods in this class should use the
Order
annotation with the default value to ensure the events are triggered in the right order- Since:
- 4.0
- Author:
- joseross
-
-
Constructor Summary
Constructors Constructor Description BootstrapManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isSystemReady()
Indicates if the bootstrap process is completed and the system can be used.void
onBootstrapFinished()
Object
onContextRefresh()
Object
onStartClusterSetup()
Object
onStartUpgrade()
-
-
-
Method Detail
-
isSystemReady
public boolean isSystemReady()
Description copied from interface:SystemStatusProvider
Indicates if the bootstrap process is completed and the system can be used.- Specified by:
isSystemReady
in interfaceSystemStatusProvider
- Returns:
- true if ready
-
onContextRefresh
@Order(2) @EventListener(value=org.springframework.context.event.ContextRefreshedEvent.class, condition="event.applicationContext.parent == null") public Object onContextRefresh()
-
onStartUpgrade
@Order @EventListener(StartUpgradeEvent.class) public Object onStartUpgrade()
-
onStartClusterSetup
@Order @EventListener(StartClusterSetupEvent.class) public Object onStartClusterSetup()
-
onBootstrapFinished
@Order @EventListener(BootstrapFinishedEvent.class) public void onBootstrapFinished()
-
-