public interface SpringApplicationShutdownHandlers
shutdown hooks
except that they run sequentially rather than concurrently.
Shutdown handlers are guaranteed to be called only after registered
ApplicationContext
instances have been closed and are no longer active.
SpringApplication.getShutdownHandlers()
,
SpringApplication.setRegisterShutdownHook(boolean)
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.Runnable action)
Add an action to the handlers that will be run when the JVM exits.
|
void |
remove(java.lang.Runnable action)
Remove a previously added an action so that it no longer runs when the JVM exits.
|
void add(java.lang.Runnable action)
action
- the action to addvoid remove(java.lang.Runnable action)
action
- the action to remove