Package org.jboss.as.cli.gui.metacommand
Class ScriptAction.ScriptRunner
- java.lang.Object
-
- javax.swing.SwingWorker<Object,org.jboss.as.cli.gui.metacommand.ScriptAction.OutMessage>
-
- org.jboss.as.cli.gui.metacommand.ScriptAction.ScriptRunner
-
- All Implemented Interfaces:
Runnable,Future<Object>,RunnableFuture<Object>
- Enclosing class:
- ScriptAction
protected class ScriptAction.ScriptRunner extends SwingWorker<Object,org.jboss.as.cli.gui.metacommand.ScriptAction.OutMessage>
Use a SwingWorker to run the script in the background. Some commands such as deploy can take a long time, so they can tie up the event dispatch thread and freeze the UI.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.SwingWorker
SwingWorker.StateValue
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ObjectdoInBackground()protected voidprocess(List<org.jboss.as.cli.gui.metacommand.ScriptAction.OutMessage> messages)-
Methods inherited from class javax.swing.SwingWorker
addPropertyChangeListener, cancel, done, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, publish, removePropertyChangeListener, run, setProgress
-
-
-
-
Method Detail
-
doInBackground
protected Object doInBackground() throws Exception
- Specified by:
doInBackgroundin classSwingWorker<Object,org.jboss.as.cli.gui.metacommand.ScriptAction.OutMessage>- Throws:
Exception
-
process
protected void process(List<org.jboss.as.cli.gui.metacommand.ScriptAction.OutMessage> messages)
- Overrides:
processin classSwingWorker<Object,org.jboss.as.cli.gui.metacommand.ScriptAction.OutMessage>
-
-