|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.exolab.jmscts.core.AsyncExecutor
This class enables java applications to be executed asynchronously, with the output being captured, or echoed to System.out and System.err Clients can register a listener to be notified when the application starts and stops.
Executor,
ExecutionListener| Constructor Summary | |
AsyncExecutor(java.lang.Class application,
java.lang.String arguments,
int port)
Constructor to execute a command, with output going to System.out and System.err |
|
AsyncExecutor(java.lang.Class application,
java.lang.String arguments,
java.io.OutputStream out,
int port)
Constructor to execute a command, with all output going to a stream |
|
AsyncExecutor(java.lang.Class application,
java.lang.String arguments,
java.io.OutputStream out,
java.io.OutputStream err,
int port)
Constructor to execute a command with standard output and error output going to two separate streams |
|
| Method Summary | |
void |
addListener(ExecutionListener listener)
Add a listener to monitor for execution events |
void |
removeListener(ExecutionListener listener)
Remove a listener |
void |
run()
Execute the command in a separate thread. |
void |
stop()
Stop the process |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AsyncExecutor(java.lang.Class application,
java.lang.String arguments,
int port)
application - the class of the application to executearguments - any arguments to pass to the applicationport - the RMI registry port
public AsyncExecutor(java.lang.Class application,
java.lang.String arguments,
java.io.OutputStream out,
int port)
application - the class of the application to executearguments - any arguments to pass to the applicationout - the stream to log output toport - the RMI registry port
public AsyncExecutor(java.lang.Class application,
java.lang.String arguments,
java.io.OutputStream out,
java.io.OutputStream err,
int port)
application - the class of the application to executearguments - any arguments to pass to the applicationout - the stream to direct standard output toerr - the stream to direct standard error toport - the RMI registry port| Method Detail |
public void addListener(ExecutionListener listener)
listener - the listener to addpublic void removeListener(ExecutionListener listener)
listener - the listener to removepublic void run()
public void stop()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||