1 | public class RExecRead extends RExecSubTask {↵ | | 1 | public class TelnetRead extends TelnetSubTask {↵
|
2 | private Integer timeout = null;↵ | | 2 | private Integer timeout = null;↵
|
3 | /**↵ | | 3 | /**↵
|
4 | * Execute the read exec task.↵ | | 4 | * Execute the read task.↵
|
5 | * @param rexec the task to use↵ | | 5 | * @param telnet the task to use↵
|
6 | * @throws BuildException on error↵ | | 6 | * @throws BuildException on error↵
|
7 | */↵ | | 7 | */↵
|
8 | public void execute(AntRExecClient rexec)↵ | | 8 | public void execute(AntTelnetClient telnet)↵
|
9 | throws BuildException {↵ | | 9 | throws BuildException {↵
|
10 | rexec.waitForString(taskString, timeout);↵ | | 10 | telnet.waitForString(taskString, timeout);↵
|
11 | }↵ | | 11 | }↵
|
12 | /**↵ | | 12 | /**↵
|
13 | * a timeout value that overrides any task wide timeout.↵ | | 13 | * a timeout value that overrides any task wide timeout.↵
|
14 | * @param i an <code>Integer</code> value↵ | | 14 | * @param i an <code>Integer</code> value↵
|
15 | */↵ | | 15 | */↵
|
16 | public void setTimeout(Integer i) {↵ | | 16 | public void setTimeout(Integer i) {↵
|
17 | this.timeout = i;↵ | | 17 | this.timeout = i;↵
|
18 | }↵ | | 18 | }↵
|
|
19 | /**↵ | | 19 | /**↵
|
20 | * Sets the default timeout if none has been set already↵ | | 20 | * Sets the default timeout if none has been set already↵
|
21 | * @param defaultTimeout an <code>Integer</code> value↵ | | 21 | * @param defaultTimeout an <code>Integer</code> value↵
|
22 | * @ant.attribute ignore="true"↵ | | 22 | * @ant.attribute ignore="true"↵
|
23 | */↵ | | 23 | */↵
|
24 | public void setDefaultTimeout(Integer defaultTimeout) {↵ | | 24 | public void setDefaultTimeout(Integer defaultTimeout) {↵
|
25 | if (timeout == null) {↵ | | 25 | if (timeout == null) {↵
|
26 | timeout = defaultTimeout;↵ | | 26 | timeout = defaultTimeout;↵
|
27 | | | 27 |
|