public class RuntimeExecBootstrapBean
extends org.springframework.extensions.surf.util.AbstractLifecycleBean
Constructor and Description |
---|
RuntimeExecBootstrapBean()
Initializes the bean
failOnError = true
killProcessesOnShutdown = true
enabled = true
|
Modifier and Type | Method and Description |
---|---|
protected void |
onBootstrap(org.springframework.context.ApplicationEvent event) |
protected void |
onShutdown(org.springframework.context.ApplicationEvent event)
Handle the shutdown of a subsystem but not the entire VM
|
void |
setDisabledAtStartUp(String disabledAtStartUp)
Deprecated.
Use
setEnabled(java.lang.String) instead, remembering that the boolean property should be inverted. |
void |
setEnabled(String enabled)
Set whether or not the process should be enabled at ApplicationContext bootstrap.
|
void |
setEnabledFromBean(BooleanBean enabled) |
void |
setFailOnError(boolean failOnError)
Set whether a process failure generates an error or not.
|
void |
setKillProcessesOnShutdown(boolean killProcessesOnShutdown)
Set whether or not to force a shutdown of successfully started processes.
|
void |
setStartupCommands(List<RuntimeExec> startupCommands)
Set the commands to execute, in sequence, when the application context
is initialized.
|
public RuntimeExecBootstrapBean()
public void setStartupCommands(List<RuntimeExec> startupCommands)
startupCommands
- list of commandspublic void setFailOnError(boolean failOnError)
failOnError
- true (default) to issue an error message and throw an
exception if the process fails to execute or generates an error
return value.public void setKillProcessesOnShutdown(boolean killProcessesOnShutdown)
killProcessesOnShutdown
- true to force any successfully executed commands' processes to
be forcibly killed when the server shuts down.public void setDisabledAtStartUp(String disabledAtStartUp)
setEnabled(java.lang.String)
instead, remembering that the boolean property should be inverted.false
by default.
This method has been deprecated in favour of a clearer name introduced in 3.3.
See setEnabled(java.lang.String)
.disabledAtStartUp
- any String which equalsIgnoreCase("true")
to prevent the command from being executed.public void setEnabled(String enabled)
true
by default.enabled
- any String which does not equalsIgnoreCase("true")
will prevent the command from being executed.public void setEnabledFromBean(BooleanBean enabled)
protected void onBootstrap(org.springframework.context.ApplicationEvent event)
onBootstrap
in class org.springframework.extensions.surf.util.AbstractLifecycleBean
protected void onShutdown(org.springframework.context.ApplicationEvent event)
onShutdown
in class org.springframework.extensions.surf.util.AbstractLifecycleBean
Copyright © 2005–2020 Alfresco Software. All rights reserved.