Package org.alfresco.util.exec
Class RuntimeExecShutdownBean
- java.lang.Object
-
- org.springframework.extensions.surf.util.AbstractLifecycleBean
-
- org.alfresco.util.exec.RuntimeExecShutdownBean
-
- All Implemented Interfaces:
EventListener,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener
public class RuntimeExecShutdownBean extends org.springframework.extensions.surf.util.AbstractLifecycleBeanThis bean executes a list of shutdown commands when either the VM shuts down or the application context closes. In both cases, the commands are only executed if the application context was started.- Author:
- Derek Hulley
-
-
Constructor Summary
Constructors Constructor Description RuntimeExecShutdownBean()Initializes the bean with empty defaults, i.e.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidonBootstrap(org.springframework.context.ApplicationEvent event)protected voidonShutdown(org.springframework.context.ApplicationEvent event)voidsetShutdownCommands(List<RuntimeExec> startupCommands)Set the commands to execute, in sequence, when the application context is initialized.
-
-
-
Method Detail
-
setShutdownCommands
public void setShutdownCommands(List<RuntimeExec> startupCommands)
Set the commands to execute, in sequence, when the application context is initialized.- Parameters:
startupCommands- list of commands
-
onBootstrap
protected void onBootstrap(org.springframework.context.ApplicationEvent event)
- Specified by:
onBootstrapin classorg.springframework.extensions.surf.util.AbstractLifecycleBean
-
onShutdown
protected void onShutdown(org.springframework.context.ApplicationEvent event)
- Specified by:
onShutdownin classorg.springframework.extensions.surf.util.AbstractLifecycleBean
-
-