|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
gov.bnl.star.offline.scheduler.util.Task
gov.bnl.star.offline.scheduler.util.CSHCommandLineTask
public class CSHCommandLineTask
A command line task.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class gov.bnl.star.offline.scheduler.util.Task |
|---|
exitStatus |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
CSHCommandLineTask(java.lang.String commandLine)
A new command line task. |
|
CSHCommandLineTask(java.lang.String commandLine,
boolean bufferCommandOutput)
A new command line task. |
|
CSHCommandLineTask(java.lang.String commandLine,
boolean bufferCommandError,
int msTimeout)
|
|
CSHCommandLineTask(java.lang.String commandLine,
int msTimeout)
A new command line task with a timeout. |
|
CSHCommandLineTask(java.lang.String commandLine,
int msTimeout,
boolean bufferCommandOutput)
|
|
| Method Summary | |
|---|---|
void |
destroy()
|
java.lang.String |
getOutput()
Returns all the output of the command. |
java.io.BufferedReader |
getOutputReader()
Returns the output of the command |
static void |
main(java.lang.String[] args)
|
void |
run()
Calls the external command. |
| Methods inherited from class gov.bnl.star.offline.scheduler.util.Task |
|---|
execute, getExitStatus |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CSHCommandLineTask(java.lang.String commandLine)
WARNING: the parsing of the command line won't be what you would have while executing at a UNIX prompt. The command line won't be passed to the shell, that is why it may have different result. For example, wildcards are usually resolved by the shell, and not by the program themselves.
commandLine - the command line to be executed
public CSHCommandLineTask(java.lang.String commandLine,
boolean bufferCommandOutput)
getOutput or
getOutputReader
WARNING: the parsing of the command line won't be what you would have while executing at a UNIX prompt. The command line won't be passed to the shell, that is why it may have different result. For example, wildcards are usually resolved by the shell, and not by the program themselves.
commandLine - the command line to be executedbufferCommandOutput - if true, the output will be buffered
public CSHCommandLineTask(java.lang.String commandLine,
int msTimeout)
WARNING: the parsing of the command line won't be what you would have while executing at a UNIX prompt. The command line won't be passed to the shell, that is why it may have different result. For example, wildcards are usually resolved by the shell, and not by the program themselves.
commandLine - msTimeout -
public CSHCommandLineTask(java.lang.String commandLine,
int msTimeout,
boolean bufferCommandOutput)
public CSHCommandLineTask(java.lang.String commandLine,
boolean bufferCommandError,
int msTimeout)
| Method Detail |
|---|
public void run()
execute instead.
run in interface java.lang.Runnablerun in class java.lang.Threadpublic void destroy()
destroy in class java.lang.Threadpublic java.lang.String getOutput()
public java.io.BufferedReader getOutputReader()
public static void main(java.lang.String[] args)
args - the command line arguments
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||