Interface ProcessTask
-
- All Superinterfaces:
Callable<ProcessTask>
public interface ProcessTask extends Callable<ProcessTask>
Executes command task.- Since:
- 1.11
- Author:
- Erwin Mueller, erwin.mueller@deventm.org
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddObserver(Observer... observer)Adds the process task observer(s).ProcessTaskcall()Executes the command.voiddestroy()Kills the process.CommandLinegetCommandLine()Returns the command line of the process.StringgetErr()Returns the standard error output of the process after the process finished.intgetExitValue()Returns the exit value of the process after the process finished.StringgetOut()Returns the standard output of the process after the process finished.ProcessgetProcess()Returns the process of the executed command.voidremoveObserver(Observer... observer)Removes the process task observer(s).
-
-
-
Method Detail
-
call
ProcessTask call() throws CommandExecException
Executes the command.- Specified by:
callin interfaceCallable<ProcessTask>- Throws:
CommandExecException
-
getCommandLine
CommandLine getCommandLine()
Returns the command line of the process.- Returns:
- the
CommandLine.
-
destroy
void destroy()
Kills the process.
-
getOut
String getOut()
Returns the standard output of the process after the process finished.- Returns:
- the
Stringstandard output.
-
getErr
String getErr()
Returns the standard error output of the process after the process finished.- Returns:
- the
Stringstandard error output.
-
getExitValue
int getExitValue()
Returns the exit value of the process after the process finished.- Returns:
- the exit value.
-
addObserver
void addObserver(Observer... observer)
Adds the process task observer(s).- Parameters:
observer- theObserver.
-
-