org.objectweb.carol.irmi.test
Class Command

java.lang.Object
  extended byorg.objectweb.carol.irmi.test.Command

public class Command
extends Object

Command

Author:
Rafael H. Schloming <rhs@mit.edu>

Nested Class Summary
 class Command.Output
           
 
Constructor Summary
Command(String cmd)
           
 
Method Summary
 boolean expect(String expected)
           
 boolean expectError(String expected)
           
 String getCommand()
           
 Command.Output getError()
           
 PrintWriter getInput()
           
 Command.Output getOutput()
           
 String getResult()
           
 void start()
           
 void waitFor()
           
 void write(String str)
           
 void writeln(String str)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Command

public Command(String cmd)
Method Detail

getCommand

public String getCommand()

start

public void start()
           throws IOException
Throws:
IOException

getInput

public PrintWriter getInput()

write

public void write(String str)

writeln

public void writeln(String str)

getOutput

public Command.Output getOutput()

expect

public boolean expect(String expected)
               throws InterruptedException
Throws:
InterruptedException

getError

public Command.Output getError()

expectError

public boolean expectError(String expected)
                    throws InterruptedException
Throws:
InterruptedException

getResult

public String getResult()

waitFor

public void waitFor()
             throws InterruptedException
Throws:
InterruptedException