|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.health.action.AbstractHealthAction
com.caucho.health.action.ExecCommand
@Singleton @Configurable public class ExecCommand
Health action to execute a shell command.
<health:HttpStatusHealthCheck ee:Named="httpStatusCheck">
<url>http://localhost:8080/test-ping.jsp</url>
</health:HttpStatusHealthCheck>
<health:ExecCommand>
<command>/opt/company/custom_command.sh</command>
<health:IfHealthCritical healthCheck="${httpStatusCheck}"/>
<health:IfRechecked/>
</health:Restart>
| Nested Class Summary | |
|---|---|
static class |
ExecCommand.Env
|
| Constructor Summary | |
|---|---|
ExecCommand()
|
|
| Method Summary | |
|---|---|
void |
addEnv(ExecCommand.Env env)
Add a custom env variable, system variable are available by default |
void |
doActionImpl(HealthEvent healthEvent)
|
java.lang.String |
getCommand()
|
java.io.File |
getDir()
|
java.util.Map<java.lang.String,java.lang.String> |
getEnv()
|
long |
getTimeout()
|
void |
init()
|
void |
setCommand(java.lang.String command)
Set the command line to execute |
void |
setDir(java.io.File dir)
Set the directory to execute from |
void |
setTimeout(Period timeout)
Set the timeout on execution of the command, after which it will be killed |
void |
setTimeoutMillis(long timeout)
|
| Methods inherited from class com.caucho.health.action.AbstractHealthAction |
|---|
add, addListener, doAction, getPredicates, start, stop, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ExecCommand()
| Method Detail |
|---|
@PostConstruct public void init()
init in class AbstractHealthActionpublic java.lang.String getCommand()
@Configurable public void setCommand(java.lang.String command)
public java.io.File getDir()
@Configurable public void setDir(java.io.File dir)
public long getTimeout()
@Configurable public void setTimeout(Period timeout)
@Configurable public void setTimeoutMillis(long timeout)
@Configurable public void addEnv(ExecCommand.Env env)
public java.util.Map<java.lang.String,java.lang.String> getEnv()
public void doActionImpl(HealthEvent healthEvent)
doActionImpl in class AbstractHealthAction
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||