|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.aludratest.service.cmdline.CommandLineProcess<E>
E
- The child class, to be specified when inheriting the CommandLineProcess classpublic class CommandLineProcess<E extends CommandLineProcess<E>>
Business delegate class for creating and accessing a command line process.
Constructor Summary | |
---|---|
CommandLineProcess(String processType,
String processName,
CommandLineService service,
int processTimeout,
int responseTimeout,
String... commands)
Creates a CommandLineProcess instance. |
Method Summary | |
---|---|
E |
assertExitValue(IntData expectedValue)
Waits for the process to finish and asserts an exit value. |
E |
destroy()
Kills the process |
E |
enter(StringData text)
Sends the given text to the process' stdin. |
E |
enterLine(String text)
Enters the provided text and appends a line feed. |
Out |
errOut()
|
E |
setEnvironmentVariable(String key,
String value)
Sets an environment variable for the process. |
E |
setRelativeWorkingDirectory(String directoryPath)
Sets the working directory of the process |
E |
start()
Starts the process. |
StdIn |
stdIn()
|
Out |
stdOut()
|
String |
toString()
|
E |
waitUntilFinished()
Waits for the process to finish. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CommandLineProcess(String processType, String processName, CommandLineService service, int processTimeout, int responseTimeout, String... commands)
CommandLineProcess
instance.
processType
- the process typeprocessName
- the process nameservice
- the underlying CommandLineService
processTimeout
- the maximum time to wait for process terminationresponseTimeout
- the maximum time to wait for process responsecommands
- the commands used to start the processMethod Detail |
---|
public E setRelativeWorkingDirectory(String directoryPath)
directoryPath
- the path of the directory to be used
public E setEnvironmentVariable(String key, String value)
key
- value
-
public E start()
public StdIn stdIn()
StdIn
for processing the process' standard inputpublic Out stdOut()
Out
for the process' standard outputpublic Out errOut()
Out
for the process' error outputpublic E enterLine(String text)
text
- the text to enter
public E enter(StringData text)
text
-
public E waitUntilFinished()
public E assertExitValue(IntData expectedValue)
expectedValue
-
public E destroy()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |