|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.enough.polish.emulator.process.ProcessCondition
de.enough.polish.emulator.process.ProcessWait
public class ProcessWait
Waits until an started process prints a matching line and just returns. Used in emulators to wait till a specific stage in a process is reached.
Copyright Enough Software 2008-2009
| Constructor Summary | |
|---|---|
ProcessWait(String[] arguments,
String regex)
Constructs a new Wait instance. |
|
ProcessWait(String[] arguments,
String[] regexes)
Constructs a new Wait instance. |
|
ProcessWait(String[] arguments,
String[] regexes,
long timeout)
|
|
| Method Summary | |
|---|---|
void |
filter(String message,
PrintStream output)
Filters the given message. |
void |
proceed()
Used to resolve wait() in the constructor. |
void |
run()
|
| Methods inherited from class de.enough.polish.emulator.process.ProcessCondition |
|---|
isMet, matches |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ProcessWait(String[] arguments,
String regex)
throws IOException
arguments
and wait for proceed() to be called
in filter() to return.
arguments - the arguments for the process to startregex - the regex for a line to match
IOException - if an process error occurs
public ProcessWait(String[] arguments,
String[] regexes)
throws IOException
arguments
and wait for proceed() to be called
in filter() to return.
arguments - the arguments for the process to startregexes - the regex conditions for a line to match (first match will abort the wait)
IOException - if an process error occurs
public ProcessWait(String[] arguments,
String[] regexes,
long timeout)
throws IOException
IOException| Method Detail |
|---|
public void proceed()
wait() in the constructor.
public void filter(String message,
PrintStream output)
OutputFilter
filter in interface OutputFilterfilter in class ProcessConditionmessage - the messageoutput - the output stream to which the message can be written.public void run()
run in interface Runnable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||