org.openqa.selenium.os
Class CommandLine

java.lang.Object
  extended by org.openqa.selenium.os.CommandLine

public class CommandLine
extends Object


Constructor Summary
CommandLine(String[] cmdarray)
           
CommandLine(String executable, String... args)
           
 
Method Summary
 void copyOutputTo(OutputStream out)
           
 int destroy()
          Destroy the current command.
 void execute()
           
 void executeAsync()
           
static String find(String executable)
          Deprecated. Use the commandline itself to execute your command.
 int getExitCode()
           
static String getLibraryPathPropertyName()
           
 String getStdOut()
           
 boolean isRunning()
          Check whether the current command is still executing.
 boolean isSuccessful()
           
 void setDynamicLibraryPath(String newLibraryPath)
           
 void setEnvironmentVariable(String name, String value)
          Adds the specified environment variable.
 void setEnvironmentVariables(Map<String,String> environment)
          Adds the specified environment variables.
 void setInput(String allInput)
           
 void setWorkingDirectory(String workingDirectory)
           
 String toString()
           
 void waitFor()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CommandLine

public CommandLine(String executable,
                   String... args)

CommandLine

public CommandLine(String[] cmdarray)
Method Detail

setEnvironmentVariables

public void setEnvironmentVariables(Map<String,String> environment)
Adds the specified environment variables.

Parameters:
environment - the variables to add
Throws:
IllegalArgumentException - if any value given is null (unsupported)

setEnvironmentVariable

public void setEnvironmentVariable(String name,
                                   String value)
Adds the specified environment variable.

Parameters:
name - the name of the environment variable
value - the value of the environment variable
Throws:
IllegalArgumentException - if the value given is null (unsupported)

setDynamicLibraryPath

public void setDynamicLibraryPath(String newLibraryPath)

getLibraryPathPropertyName

public static String getLibraryPathPropertyName()
Returns:
The platform specific env property name which contains the library path.

find

@Deprecated
public static String find(String executable)
Deprecated. Use the commandline itself to execute your command.


executeAsync

public void executeAsync()

execute

public void execute()

waitFor

public void waitFor()

isSuccessful

public boolean isSuccessful()

getExitCode

public int getExitCode()

getStdOut

public String getStdOut()

destroy

public int destroy()
Destroy the current command.

Returns:
The exit code of the command.

isRunning

public boolean isRunning()
Check whether the current command is still executing.

Returns:
true if the current command is still executing, false otherwise

setInput

public void setInput(String allInput)

setWorkingDirectory

public void setWorkingDirectory(String workingDirectory)

toString

public String toString()
Overrides:
toString in class Object

copyOutputTo

public void copyOutputTo(OutputStream out)


Copyright © 2013. All rights reserved.