org.alfresco.util.exec
Class RuntimeExecShutdownBean
java.lang.Object
org.springframework.extensions.surf.util.AbstractLifecycleBean
org.alfresco.util.exec.RuntimeExecShutdownBean
- All Implemented Interfaces:
- java.util.EventListener, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener
public class RuntimeExecShutdownBean
- extends org.springframework.extensions.surf.util.AbstractLifecycleBean
This 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.
Fields inherited from class org.springframework.extensions.surf.util.AbstractLifecycleBean |
log |
Method Summary |
protected void |
onBootstrap(org.springframework.context.ApplicationEvent event)
|
protected void |
onShutdown(org.springframework.context.ApplicationEvent event)
|
void |
setShutdownCommands(java.util.List startupCommands)
Set the commands to execute, in sequence, when the application context
is initialized. |
Methods inherited from class org.springframework.extensions.surf.util.AbstractLifecycleBean |
getApplicationContext, onApplicationEvent, setApplicationContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RuntimeExecShutdownBean
public RuntimeExecShutdownBean()
- Initializes the bean with empty defaults, i.e. it will do nothing
setShutdownCommands
public void setShutdownCommands(java.util.List 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:
onBootstrap
in class org.springframework.extensions.surf.util.AbstractLifecycleBean
onShutdown
protected void onShutdown(org.springframework.context.ApplicationEvent event)
- Specified by:
onShutdown
in class org.springframework.extensions.surf.util.AbstractLifecycleBean
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.