|
LEONARDI Application Composer - 8.9.0.40 by W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
leon.misc.LyProcessViewer
public final class LyProcessViewer
This class is used to execute an external process, capture its output and redirect it to the standard console. If a script is used, all commands that require a user input (pause, etc.) will block the process.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
LyProcessViewer(LyEnvironment environment,
java.lang.String[] commands,
boolean waiting)
Constructor. |
|
LyProcessViewer(LyEnvironment environment,
java.lang.String[] commands,
boolean waiting,
int refreshRate)
Constructor. |
|
LyProcessViewer(LyEnvironment environment,
java.lang.String[] commands,
boolean waiting,
int refreshRate,
java.lang.String errorMessage)
Constructor. |
|
LyProcessViewer(LyEnvironment environment,
java.lang.String[] commands,
boolean waiting,
int refreshRate,
java.lang.String errorMessage,
boolean raiseError)
Constructor. |
|
LyProcessViewer(LyEnvironment environment,
java.lang.String script,
boolean waiting)
Constructor. |
|
LyProcessViewer(LyEnvironment environment,
java.lang.String script,
boolean waiting,
int refreshRate)
Constructor. |
|
LyProcessViewer(LyEnvironment environment,
java.lang.String script,
boolean waiting,
int refreshRate,
java.lang.String errorMessage)
Constructor. |
|
LyProcessViewer(LyEnvironment environment,
java.lang.String script,
boolean waiting,
int refreshRate,
java.lang.String errorMessage,
boolean raiseError)
Constructor. |
Method Summary | |
---|---|
void |
abort()
Abort the current process. |
LyEnvironment |
getEnvironment()
Gets process viewer environment. |
java.lang.Process |
getProcess()
Gets the process corresponding to command execution when used as console. |
int |
getReturnCode()
Gets the process returnCode. |
boolean |
isRunning()
Checks if the process viewer is still running or not. |
void |
printConsole()
Displays process output to standard output. |
void |
run()
Waits for process completion and redirect its outputs to standard output. |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, 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 |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String __VERSION
Constructor Detail |
---|
public LyProcessViewer(LyEnvironment environment, java.lang.String script, boolean waiting, int refreshRate)
environment
- the environment of the commandscript
- system script which should be executed.waiting
- indicates whether the call is waiting for process completionrefreshRate
- refresh rate.public LyProcessViewer(LyEnvironment environment, java.lang.String[] commands, boolean waiting, int refreshRate)
environment
- the environment of the commandcommands
- command list which should be executed.waiting
- indicates whether the call is waiting for process completionrefreshRate
- refresh rate.public LyProcessViewer(LyEnvironment environment, java.lang.String script, boolean waiting, int refreshRate, java.lang.String errorMessage)
environment
- the environment of the commandscript
- system script which should be executed.waiting
- indicates whether the call is waiting for process completionrefreshRate
- refresh rate.errorMessage
- The error message to show if the process fails.public LyProcessViewer(LyEnvironment environment, java.lang.String[] commands, boolean waiting, int refreshRate, java.lang.String errorMessage)
environment
- the environment of the commandcommands
- command list which should be executed.waiting
- indicates whether the call is waiting for process completionrefreshRate
- refresh rate.errorMessage
- The error message to show if the process fails.public LyProcessViewer(LyEnvironment environment, java.lang.String[] commands, boolean waiting, int refreshRate, java.lang.String errorMessage, boolean raiseError)
environment
- the environment of the commandcommands
- command list which should be executed.waiting
- indicates whether the call is waiting for process completionrefreshRate
- refresh rate.errorMessage
- The error message to show if the process fails.raiseError
- if true, raise errors to the userpublic LyProcessViewer(LyEnvironment environment, java.lang.String script, boolean waiting, int refreshRate, java.lang.String errorMessage, boolean raiseError)
environment
- the environment of the commandscript
- system script which should be executed.waiting
- indicates whether the call is waiting for process completionrefreshRate
- refresh rate.errorMessage
- The error message to show if the process fails.raiseError
- if true, raise errors to the userpublic LyProcessViewer(LyEnvironment environment, java.lang.String script, boolean waiting)
LyProcessViewer(environment, script, waiting, 500)
in order to set the refresh rate to
500ms.
environment
- the environment of the commandscript
- system script which should be executed.waiting
- indicates whether the call is waiting for process completionpublic LyProcessViewer(LyEnvironment environment, java.lang.String[] commands, boolean waiting)
LyProcessViewer(environment, script, waiting, 500)
in order to set the refresh rate to
500ms.
environment
- the environment of the commandcommands
- command list which should be executed.waiting
- indicates whether the call is waiting for process completionMethod Detail |
---|
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void printConsole()
public void abort()
public int getReturnCode()
public boolean isRunning()
public LyEnvironment getEnvironment()
public java.lang.Process getProcess()
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |