|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.netbeans.modules.vcscore.commands.CommandProcessor
This class is used as a container of all external commands which are either running or finished.
Field Summary | |
static int |
PREPROCESS_CANCELLED
The preprocessing of the command was cancelled. |
static int |
PREPROCESS_DONE
The preprocessing is done. |
static int |
PREPROCESS_NEXT_FILE
When there are more files selected, the preprocessing needs to be done for next files again. |
Method Summary | |
void |
addCommandProcessListener(CommandProcessListener listener)
Add a command listener. |
void |
cleanup()
This stops the execution starter loop. |
protected void |
finalize()
|
long |
getExecutionTime(CommandTask task)
The execution time of the command or zero, when the command did not finish yet or can not be found. |
static String |
getExitStatusString(int exit)
Get the localized string representation of the command exit status. |
long |
getFinishTime(CommandTask task)
The finish time of the command or zero, when the command did not finish yet or can not be found. |
static CommandProcessor |
getInstance()
Get the instance of CommandProcessor. |
CommandTask |
getParentTask(CommandTask task)
Get the parent task if any. |
String[] |
getRunningCommandsLabels()
Get display names of running commands. |
long |
getStartTime(CommandTask task)
The start time of the command or zero, when the command was not started yet or can not be found. |
long |
getTaskID(CommandTask task)
Get the task's ID. |
boolean |
isRunning(CommandTask task)
Tells whether the executor is still running. |
boolean |
isSomeRunning()
Whether some command is still running. |
boolean |
isWaiting(CommandTask task)
Tells whether a task is waiting. |
void |
kill(CommandTask task)
Kill the executor if it is running. |
void |
killAll()
Kill all running executors. |
void |
preprocess(Command cmd)
Pre-process the task. |
boolean |
preprocessSynchronous(Command cmd)
Pre-process the task. |
void |
process(CommandTaskInfo info)
Process the task. |
void |
removeCommandProcessListener(CommandProcessListener listener)
Remove a command listener. |
void |
waitToFinish(Command cmd,
Set files)
Wait to finish the execution of command on a set of files. |
void |
waitToFinish(CommandTask task)
Wait to finish the task. |
void |
waitToFinish(long taskID)
Wait to finish the task of a specific ID. |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int PREPROCESS_CANCELLED
public static final int PREPROCESS_NEXT_FILE
public static final int PREPROCESS_DONE
Method Detail |
public static CommandProcessor getInstance()
protected void finalize()
public void cleanup()
public long getTaskID(CommandTask task)
task
- The task
public CommandTask getParentTask(CommandTask task)
task
- The task.
null
when there is no parent task.public boolean preprocessSynchronous(Command cmd)
preprocess(org.netbeans.api.vcs.commands.Command)
method in other cases.
public void preprocess(Command cmd)
public void process(CommandTaskInfo info)
public boolean isSomeRunning()
public boolean isWaiting(CommandTask task)
task
- The taskpublic boolean isRunning(CommandTask task)
task
- The taskpublic String[] getRunningCommandsLabels()
public void waitToFinish(Command cmd, Set files) throws InterruptedException
cmd
- the command we wait for to finishfiles
- the set of files of type FileObject
InterruptedException
public void waitToFinish(CommandTask task) throws InterruptedException
task
- the command task
InterruptedException
public void waitToFinish(long taskID) throws InterruptedException
taskID
- the command task ID.
InterruptedException
public void killAll()
public void kill(CommandTask task)
public void addCommandProcessListener(CommandProcessListener listener)
public void removeCommandProcessListener(CommandProcessListener listener)
public long getStartTime(CommandTask task)
public long getFinishTime(CommandTask task)
public long getExecutionTime(CommandTask task)
public static String getExitStatusString(int exit)
exit
- the exit status, that will be converted to the string.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |