Package dev.dbos.transact.spring
Class DBOSAutoConfiguration.DBOSLifecycle
java.lang.Object
dev.dbos.transact.spring.DBOSAutoConfiguration.DBOSLifecycle
- All Implemented Interfaces:
org.springframework.context.Lifecycle,org.springframework.context.Phased,org.springframework.context.SmartLifecycle
- Enclosing class:
DBOSAutoConfiguration
public static class DBOSAutoConfiguration.DBOSLifecycle
extends Object
implements org.springframework.context.SmartLifecycle
Manages the
DBOS lifecycle within the Spring application context. DBOS.launch()
is called after all beans are initialized; DBOS.shutdown() is called on context close.-
Field Summary
Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.SmartLifecycle
isAutoStartup, stop
-
Constructor Details
-
DBOSLifecycle
public DBOSLifecycle(dev.dbos.transact.DBOS dbos)
-
-
Method Details
-
start
public void start()- Specified by:
startin interfaceorg.springframework.context.Lifecycle
-
stop
public void stop()- Specified by:
stopin interfaceorg.springframework.context.Lifecycle
-
isRunning
public boolean isRunning()- Specified by:
isRunningin interfaceorg.springframework.context.Lifecycle
-
getPhase
public int getPhase()High phase value ensures DBOS starts last (after all beans are ready) and stops first.- Specified by:
getPhasein interfaceorg.springframework.context.Phased- Specified by:
getPhasein interfaceorg.springframework.context.SmartLifecycle
-