public class ExecutionHandler extends Object
Constructor and Description |
---|
ExecutionHandler(String[] parameterWithProgramPath)
Creates an instance of this class.
|
ExecutionHandler(String[] parameterWithProgramPath,
File runtimeDirectory)
Creates an instance of this class.
|
ExecutionHandler(String[] parameterWithProgramPath,
String runtimeDirectory)
Creates an instance of this class.
|
ExecutionHandler(String parameter,
String programPath)
Creates an instance of this class.
|
ExecutionHandler(String parameter,
String programPath,
File runtimeDirectory)
Creates an instance of this class.
|
ExecutionHandler(String parameter,
String programPath,
String runtimeDirectory)
Creates an instance of this class.
|
Modifier and Type | Method and Description |
---|---|
void |
execute()
Executes the given application with the given parameters in the given runtime directory.
|
void |
execute(boolean logInputStream)
Executes the given application with the given parameters in the given runtime directory.
|
void |
execute(boolean logInputStream,
boolean logErrorStream)
Executes the given application with the given parameters in the given runtime directory.
|
void |
execute(boolean logInputStream,
boolean logErrorStream,
String encoding)
Executes the given application with the given parameters in the given runtime directory.
|
void |
execute(boolean logInputStream,
String encoding)
Executes the given application with the given parameters in the given runtime directory.
|
void |
execute(String encoding)
Executes the given application with the given parameters in the given runtime directory.
|
int |
exitValue()
The exit vaule of the process.
|
StreamReaderThread |
getErrorStreamReaderThread()
Gets the error stream reader thread.
|
StreamReaderThread |
getInputStreamReaderThread()
Gets the input stream reader thread (it logs the console output of the process).
|
Process |
getProcess()
Gets the started process.
|
public ExecutionHandler(String parameter, String programPath)
parameter
- The parameter to parse to the application.programPath
- The path to the application.public ExecutionHandler(String parameter, String programPath, String runtimeDirectory)
parameter
- The parameter to parse to the application.programPath
- The path to the application.runtimeDirectory
- The runtime directory for the application.public ExecutionHandler(String parameter, String programPath, File runtimeDirectory)
parameter
- The parameter to parse to the application.programPath
- The path to the application.runtimeDirectory
- The runtime directory for the application.public ExecutionHandler(String[] parameterWithProgramPath)
parameterWithProgramPath
- The parameter to parse to the application with the path to the program.public ExecutionHandler(String[] parameterWithProgramPath, String runtimeDirectory)
parameterWithProgramPath
- The parameter to parse to the application with the path to the program.runtimeDirectory
- The runtime directory for the application.public ExecutionHandler(String[] parameterWithProgramPath, File runtimeDirectory)
parameterWithProgramPath
- The parameter to parse to the application with the path to the program.runtimeDirectory
- The runtime directory for the application.public void execute() throws IOException
IOException
- Thrown if something went wrong on process building.public void execute(String encoding) throws IOException
encoding
- The encoding for the reading of the process console output.IOException
- Thrown if something went wrong on process building.public void execute(boolean logInputStream) throws IOException
logInputStream
- True
means that the console output of the output stream
of the process will be logged and can be get after the process was stopped (it's output stream
is an input stream for the process starter).IOException
- Thrown if something went wrong on process building.public void execute(boolean logInputStream, String encoding) throws IOException
logInputStream
- True
means that the console output of the output stream
of the process will be logged and can be get after the process was stopped (it's output stream
is an input stream for the process starter).encoding
- The encoding for the reading of the process console output.IOException
- Thrown if something went wrong on process building.public void execute(boolean logInputStream, boolean logErrorStream) throws IOException
logInputStream
- True
means that the console output of the output stream
of the process will be logged and can be get after the process was stopped (it's output stream
is an input stream for the process starter).logErrorStream
- True
means that the console output of the error stream
of the process will be logged and can be get after the process was stopped.IOException
- Thrown if something went wrong on process building.public void execute(boolean logInputStream, boolean logErrorStream, String encoding) throws IOException
logInputStream
- True
means that the console output of the output stream
of the process will be logged and can be get after the process was stopped (it's output stream
is an input stream for the process starter).logErrorStream
- True
means that the console output of the error stream
of the process will be logged and can be get after the process was stopped.encoding
- The encoding for the reading of the process console output.IOException
- Thrown if something went wrong on process building.public Process getProcess()
null
if the process wasn't started.public int exitValue() throws IllegalThreadStateException
IllegalThreadStateException
- Thrown if the process wasn't started or is not finished.public StreamReaderThread getInputStreamReaderThread()
public StreamReaderThread getErrorStreamReaderThread()
TV-Browser 2.7.6, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)