Class StartServ
java.lang.Object
org.glassfish.main.itest.tools.asadmin.StartServ
Tool for executing startserv command.
The tool is stateless.
- Author:
- Ondro Mihalyi
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionExecutes the command with arguments.Executes the command with arguments, waits until its standard output contains given text.toString()Adds environment property set for the asadmin execution.Do not wait for any text in stdout or stderr, wait for the process to stop or until timeoutwithTextToWaitFor(String textToWaitFor) Wait for this text in stdout or stderr and exit if found, or until timeout.
-
Constructor Details
-
StartServ
Creates a stateless instance of the tool.- Parameters:
startServ- - executable file
-
-
Method Details
-
withEnv
Adds environment property set for the asadmin execution.- Parameters:
name-value-- Returns:
- this
-
withTextToWaitFor
Wait for this text in stdout or stderr and exit if found, or until timeout. Don't wait for the process to stop- Parameters:
textToWaitFor-- Returns:
- this
-
withNoTextToWaitFor
Do not wait for any text in stdout or stderr, wait for the process to stop or until timeout- Returns:
- this
-
getCommandName
- Returns:
- asadmin command file name
-
exec
Executes the command with arguments, waits until its standard output contains given text. Doesn't terminate the command, the command should either stop later or should be killed later.- Parameters:
args- command and arguments.- Returns:
AsadminResultnever null. OK if text found in output, error if not found and command terminates or timeout reached.
-
exec
Executes the command with arguments.- Parameters:
timeout- timeout in millisargs- command and arguments.- Returns:
AsadminResultnever null.
-
toString
-