|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ourgrid.common.executor.AbstractExecutor
org.ourgrid.common.executor.Win32Executor
public class Win32Executor
Field Summary | |
---|---|
static java.lang.String |
flagCommand
|
static java.lang.String |
flagFile
|
static java.lang.String |
flagLocalDir
|
static java.lang.String |
flagMachine
|
static java.lang.String |
flagRemoteDir
|
static java.lang.String |
flagRMIPort
|
static java.lang.String |
flagTunnelPort
|
Constructor Summary | |
---|---|
Win32Executor()
|
Method Summary | |
---|---|
void |
chmod(java.io.File file,
java.lang.String mode)
Changes the permissions for the indicated file. |
static java.lang.String |
convert2WinStyle(java.lang.String inn)
This method is responsible to convert some linux variables and separators styles to Windows' ones |
protected java.io.File |
createScript(java.lang.String command,
java.lang.String dirName)
|
protected java.io.File |
createScript(java.lang.String command,
java.lang.String dirName,
java.util.Map envVars)
|
ExecutorHandle |
execute(java.lang.String dirName,
java.lang.String command)
Execute a command like a OS native script. |
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 |
protected ExecutorHandle |
getNextHandle()
This method manage the handles issued for each command execution |
ExecutorResult |
getResult(ExecutorHandle handle)
Blocks until the command finishes and returns its result |
protected void |
includeInProcesses(ExecutorHandle handle,
java.lang.Process process)
Adds a process into the set of the ones which results were not collected yet. |
void |
kill(ExecutorHandle handle)
Kills command that was issued via an execute method |
Methods inherited from class org.ourgrid.common.executor.AbstractExecutor |
---|
catchOutput |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String flagCommand
public static final java.lang.String flagMachine
public static final java.lang.String flagLocalDir
public static final java.lang.String flagRemoteDir
public static final java.lang.String flagFile
public static final java.lang.String flagTunnelPort
public static final java.lang.String flagRMIPort
Constructor Detail |
---|
public Win32Executor()
Method Detail |
---|
public void chmod(java.io.File file, java.lang.String mode) throws ExecutorException
Executor
file
- the File objectmode
- the new permission in "rwx" format
ExecutorException
- error changing the permissionspublic ExecutorHandle execute(java.lang.String dirName, java.lang.String command) throws ExecutorException
command
- The command must be executeddirName
- The directory where the execution will be started.
ExecutorException
- If the execution could not be performed.public ExecutorHandle execute(java.lang.String dirName, java.lang.String command, java.util.Map envVars) throws ExecutorException
Executor
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.public void kill(ExecutorHandle handle)
Executor
handle
- the command handlepublic ExecutorResult getResult(ExecutorHandle handle) throws ExecutorException
Executor
handle
- the command handle
ExecutorException
- when there is a problem while obtaining the
result of an execution.protected java.io.File createScript(java.lang.String command, java.lang.String dirName, java.util.Map envVars) throws ExecutorException
ExecutorException
protected java.io.File createScript(java.lang.String command, java.lang.String dirName) throws ExecutorException
ExecutorException
public static java.lang.String convert2WinStyle(java.lang.String inn)
inn
- String containing the text that should be processed and if
necessary converted to windows style
protected void includeInProcesses(ExecutorHandle handle, java.lang.Process process)
handle
- The handle for the processprocess
- The process to be included at the groupprotected ExecutorHandle getNextHandle()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |