|
Public Member Functions |
| | NativeCommand (String command, boolean foreground) |
| | NativeCommand (String command, boolean foreground, long maxExecutionTime) |
| | NativeCommand (String command, boolean foreground, long maxExecutionTime, String endMark) |
| | NativeCommand (String command, boolean foreground, long maxExecutionTime, String endMark, long interval, long delay) |
| void | setThreadFactory (ThreadFactory threads) |
| void | addListener (NativeCommand.Listener po) |
| void | removeListener (NativeCommand.Listener po) |
| String | getStatus () |
| Integer | getExitValue () |
| Throwable | getLatestException () |
| void | send (String text) |
| void | run () |
Static Public Attributes |
| final String | NEW = "new" |
| final String | RUNNING = "running" |
| final String | TERMINATED = "terminated" |
| final String | CANNOTRUN = "unable to run" |
| final String | TIMEOUT = "timed out" |
| final long | NO_TIMEOUT = -1 |
| long | DEFAULT_WATCHER_INTERVAL = 1000 |
| long | DEFAULT_WATCHER_DELAY = 500 |
Protected Member Functions |
| void | changeStatus (String newStatus) |
| void | fireStatusChanged (String oldStatus, String newStatus) |
| void | fireOutputWritten (InputStream sourceStream, String additionalOutput) |
Protected Attributes |
| OutputStreamWriter | stdin |
| Vector< NativeCommand.Listener > | listeners = new Vector<NativeCommand.Listener>() |
| String | command |
| Process | process |
| long | interval |
| long | delay |
| long | maxExecutionTime |
| String | status |
| boolean | foreground |
| String | endMark |
| Throwable | latestException |
| Integer | exitValue = null |
| Logger | log |
| ThreadFactory | threadFactoryDefault |
| ThreadFactory | threadFactory = threadFactoryDefault |
Static Protected Attributes |
| Timer | watchers |
The native command can be run a) within its own thread (as it implements Runnable), or b) directly via a call to its run() method.