|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectau.com.lastweekend.jen.util.LoopRunnable
au.com.lastweekend.jen.util.AbstractWatchdog
public abstract class AbstractWatchdog
Abstract class to continuously start a process
| Constructor Summary | |
|---|---|
AbstractWatchdog(java.lang.ProcessBuilder builder)
|
|
| Method Summary | |
|---|---|
java.lang.ProcessBuilder |
getBuilder()
|
protected abstract void |
handleStandardError(java.io.InputStream stderr)
Do something with stderr. |
protected abstract void |
handleStandardInput(java.io.OutputStream stdin)
Do something with the stdin |
protected abstract void |
handleStandardOutput(java.io.InputStream stdout)
Do something with stdout |
protected void |
loop()
This method will run repeatedly until the stop method is called or the method throws an exception. |
protected void |
processDestroy()
Called when the process is destroyed forcibly during the stop sequence. |
protected void |
processExit(int result)
Called when the process terminates of its own accord (or some external kill) |
protected void |
processStart()
Called each time the process is started |
protected abstract void |
startException(java.io.IOException e)
Handle the IO exception thrown from builder.start() |
protected void |
waitInterrupted(java.lang.InterruptedException e)
Handle the interrupt exception during the stop process. |
| Methods inherited from class au.com.lastweekend.jen.util.LoopRunnable |
|---|
run, start, stop, stopAtShutdown, stopped |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractWatchdog(java.lang.ProcessBuilder builder)
| Method Detail |
|---|
protected void processExit(int result)
result - protected void processDestroy()
protected void processStart()
protected void waitInterrupted(java.lang.InterruptedException e)
e - protected abstract void handleStandardInput(java.io.OutputStream stdin)
stdin - protected abstract void handleStandardOutput(java.io.InputStream stdout)
stdout - protected abstract void handleStandardError(java.io.InputStream stderr)
stderr - protected abstract void startException(java.io.IOException e)
e - protected final void loop()
LoopRunnable
loop in class LoopRunnablepublic java.lang.ProcessBuilder getBuilder()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||