|
Gridarta Editor
|
Class to run an external process. More...
Inheritance diagram for net.sf.gridarta.utils.ProcessRunner:
Collaboration diagram for net.sf.gridarta.utils.ProcessRunner:Classes | |
| class | CopyOutput |
| Class for reading data from a stream and appending it to a JTextArea. More... | |
Public Member Functions | |
| void | controlClear () |
| Action method for clearing the log. More... | |
| void | controlStart () |
| Action method for starting. More... | |
| void | controlStop () |
| Action method for stopping. More... | |
| ProcessRunner (@NotNull final String key, @NotNull final String[] command) | |
| Creates a ProcessRunner for running the given command in its directory. More... | |
| void | setCommand (@NotNull final String[] command) |
| Set the command to be executed by this ProcessRunner. More... | |
| void | showDialog (@NotNull final Frame parent) |
| Show a dialog if not already visible. More... | |
Private Member Functions | |
| void | createDialog (@NotNull final Frame parent) |
| Create the dialog. More... | |
| ProcessRunner (@NotNull final String key, @NotNull final String[] command, @Nullable final String dir) | |
| Creates a ProcessRunner for running the given command in the given directory. More... | |
Private Attributes | |
| String [] | command |
| The command and arguments. More... | |
| final Action | controlStart = ACTION_BUILDER.createAction(false, "controlStart", this) |
| Action for start. More... | |
| final Action | controlStop = ACTION_BUILDER.createAction(false, "controlStop", this) |
| Action for stop. More... | |
| Window | dialog |
| The Dialog. More... | |
| final File | dir |
| The working directory for the command. More... | |
| final String | key |
| The i18n key. More... | |
| final Object | lock = new Object() |
| The lock object for thread synchronization. More... | |
| transient Process | process |
| The Process. More... | |
| final CopyOutput | stderr = new CopyOutput("stderr", stdtxt) |
| CopyOutput for stderr. More... | |
| final CopyOutput | stdout = new CopyOutput("stdout", stdtxt) |
| CopyOutput for stdout. More... | |
| final JTextArea | stdtxt = new JTextArea(25, 80) |
| JTextArea with log. More... | |
Static Private Attributes | |
| static final ActionBuilder | ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta") |
| Action Builder. More... | |
| static final Category | LOG = Logger.getLogger(ProcessRunner.class) |
| The Logger for printing log messages. More... | |
| static final long | serialVersionUID = 1L |
| Serial Version. More... | |
Class to run an external process.
Definition at line 52 of file ProcessRunner.java.
|
private |
Creates a ProcessRunner for running the given command in the given directory.
| key | i18n key |
| command | the command to run and its arguments |
| dir | the working directory for command |
Definition at line 153 of file ProcessRunner.java.
References net.sf.gridarta.utils.ProcessRunner.key, and net.sf.gridarta.utils.ActionBuilderUtils.newLabel().
Here is the call graph for this function:| net.sf.gridarta.utils.ProcessRunner.ProcessRunner | ( | @NotNull final String | key, |
| @NotNull final String [] | command | ||
| ) |
Creates a ProcessRunner for running the given command in its directory.
| key | i18n key |
| command | the command to run and its arguments |
Definition at line 181 of file ProcessRunner.java.
References net.sf.gridarta.utils.ProcessRunner.command, and net.sf.gridarta.utils.ProcessRunner.key.
| void net.sf.gridarta.utils.ProcessRunner.controlClear | ( | ) |
Action method for clearing the log.
Definition at line 283 of file ProcessRunner.java.
| void net.sf.gridarta.utils.ProcessRunner.controlStart | ( | ) |
Action method for starting.
Definition at line 224 of file ProcessRunner.java.
References net.sf.gridarta.utils.ProcessRunner.lock, and net.sf.gridarta.utils.ProcessRunner.CopyOutput.start().
Here is the call graph for this function:| void net.sf.gridarta.utils.ProcessRunner.controlStop | ( | ) |
Action method for stopping.
Definition at line 271 of file ProcessRunner.java.
|
private |
Create the dialog.
| parent | owner frame to display on |
Definition at line 203 of file ProcessRunner.java.
References net.sf.gridarta.utils.ActionBuilderUtils.getString().
Referenced by net.sf.gridarta.utils.ProcessRunner.showDialog().
Here is the call graph for this function:
Here is the caller graph for this function:| void net.sf.gridarta.utils.ProcessRunner.setCommand | ( | @NotNull final String [] | command | ) |
Set the command to be executed by this ProcessRunner.
| command | the command to run and its arguments |
Definition at line 216 of file ProcessRunner.java.
Referenced by net.sf.gridarta.action.ControlClientAction.controlClient(), and net.sf.gridarta.action.ControlServerAction.controlServer().
Here is the caller graph for this function:| void net.sf.gridarta.utils.ProcessRunner.showDialog | ( | @NotNull final Frame | parent | ) |
Show a dialog if not already visible.
| parent | owner frame to display on |
Definition at line 189 of file ProcessRunner.java.
References net.sf.gridarta.utils.ProcessRunner.createDialog().
Referenced by net.sf.gridarta.action.ControlClientAction.controlClient(), and net.sf.gridarta.action.ControlServerAction.controlServer().
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticprivate |
Action Builder.
Definition at line 69 of file ProcessRunner.java.
|
private |
The command and arguments.
include
Definition at line 90 of file ProcessRunner.java.
Referenced by net.sf.gridarta.utils.ProcessRunner.ProcessRunner().
|
private |
|
private |
|
private |
|
private |
|
private |
The i18n key.
include
Definition at line 83 of file ProcessRunner.java.
Referenced by net.sf.gridarta.utils.ProcessRunner.ProcessRunner().
|
private |
The lock object for thread synchronization.
Definition at line 144 of file ProcessRunner.java.
Referenced by net.sf.gridarta.utils.ProcessRunner.controlStart().
|
staticprivate |
The Logger for printing log messages.
Definition at line 58 of file ProcessRunner.java.
|
private |
The Process.
Definition at line 103 of file ProcessRunner.java.
|
staticprivate |
Serial Version.
Definition at line 63 of file ProcessRunner.java.
|
private |
|
private |
|
private |