|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Executor
This interface defines the contract between platform dependent layer and the upper layers. The idea is to provide a clean interface that is a minimum set of features to perform native operations.
Field Summary | |
---|---|
static long |
serialVersionUID
Serial identification of the class. |
Method Summary | |
---|---|
void |
chmod(java.io.File file,
java.lang.String perm)
Changes the permissions for the indicated file. |
ExecutorHandle |
execute(java.lang.String dirName,
java.lang.String command)
Execute a local command in a specific dirName. |
ExecutorHandle |
execute(java.lang.String dirName,
java.lang.String command,
java.util.Map envVars)
Execute a local command in a specific dirName, with the environment defined by envVars |
ExecutorResult |
getResult(ExecutorHandle handle)
Blocks until the command finishes and returns its result |
void |
kill(ExecutorHandle handle)
Kills command that was issued via an execute method |
Field Detail |
---|
static final long serialVersionUID
Method Detail |
---|
ExecutorHandle execute(java.lang.String dirName, java.lang.String command, java.util.Map envVars) throws ExecutorException
dirName
- directory to execute the scriptcommand
- command to be executedenvVars
- environment variables used by this command
ExecutorException
- when there is a problem in the execution.ExecutorHandle execute(java.lang.String dirName, java.lang.String command) throws ExecutorException
dirName
- directory to execute the scriptcommand
- command to be executed
ExecutorException
- when there is a problem in the execution.void chmod(java.io.File file, java.lang.String perm) throws ExecutorException
file
- the File objectperm
- the new permission in "rwx" format
ExecutorException
- error changing the permissionsvoid kill(ExecutorHandle handle) throws ExecutorException
handle
- the command handle
ExecutorException
- when there is a problem while changing .the
permissions of a file.ExecutorResult getResult(ExecutorHandle handle) throws ExecutorException
handle
- the command handle
ExecutorException
- when there is a problem while obtaining the
result of an execution.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |