Package mgui.pipelines
Class PipelineLauncher
java.lang.Object
javax.swing.SwingWorker<java.lang.Boolean,mgui.pipelines.PipelineLauncher.TaskEvent>
mgui.pipelines.PipelineLauncher
- All Implemented Interfaces:
java.lang.Runnable,java.util.concurrent.Future<java.lang.Boolean>,java.util.concurrent.RunnableFuture<java.lang.Boolean>,DynamicPipelineListener
public class PipelineLauncher extends javax.swing.SwingWorker<java.lang.Boolean,mgui.pipelines.PipelineLauncher.TaskEvent> implements DynamicPipelineListener
A launcher for an
InterfacePipeline object. Creates and runs its own thread and then
calls InterfacePipeline.launch, which blocks until the pipeline has finished.- Since:
- 1.0
- Version:
- 1.0
- Author:
- Andrew Reid
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.SwingWorker
javax.swing.SwingWorker.StateValue -
Field Summary
Fields Modifier and Type Field Description protected java.util.ArrayList<DynamicPipelineListener>dynamic_pipeline_listenersjava.lang.StringinstanceInterfacePipelinepipelineInterfaceProjectproject -
Constructor Summary
Constructors Constructor Description PipelineLauncher(InterfacePipeline pipeline)PipelineLauncher(InterfacePipeline pipeline, java.lang.String instance, InterfaceProject project) -
Method Summary
Modifier and Type Method Description voidaddDynamicListener(DynamicPipelineListener listener)protected java.lang.BooleandoInBackground()protected voiddone()protected voidfirePipelineLaunched(mgui.pipelines.PipelineLauncher.TaskEvent event)protected voidfirePipelineTaskLaunched(mgui.pipelines.PipelineLauncher.TaskEvent event)protected voidfirePipelineTaskTerminated(mgui.pipelines.PipelineLauncher.TaskEvent event)protected voidfirePipelineTaskUpdated(mgui.pipelines.PipelineLauncher.TaskEvent event)protected voidfirePipelineTerminated(mgui.pipelines.PipelineLauncher.TaskEvent event)voidpipelineLaunched(DynamicPipelineEvent event)Called when a pipeline is initially launchedvoidpipelineTaskLaunched(DynamicPipelineEvent event, PipelineTask task)Called when a pipeline task is launched.voidpipelineTaskTerminated(DynamicPipelineEvent event, PipelineTask task)Called when a pipeline task is terminated.voidpipelineTaskUpdated(DynamicPipelineEvent event, PipelineTask task)Called when a pipeline task requests to publish an update.voidpipelineTerminated(DynamicPipelineEvent event)Called when a pipeline is terminated.protected voidprocess(java.util.List<mgui.pipelines.PipelineLauncher.TaskEvent> events)voidremoveDynamicListener(DynamicPipelineListener listener)Methods inherited from class javax.swing.SwingWorker
addPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, publish, removePropertyChangeListener, run, setProgressMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
dynamic_pipeline_listeners
-
instance
public java.lang.String instance -
project
-
pipeline
-
-
Constructor Details
-
PipelineLauncher
-
PipelineLauncher
public PipelineLauncher(InterfacePipeline pipeline, java.lang.String instance, InterfaceProject project)
-
-
Method Details
-
addDynamicListener
-
removeDynamicListener
-
doInBackground
protected java.lang.Boolean doInBackground() throws java.lang.Exception- Specified by:
doInBackgroundin classjavax.swing.SwingWorker<java.lang.Boolean,mgui.pipelines.PipelineLauncher.TaskEvent>- Throws:
java.lang.Exception
-
done
protected void done()- Overrides:
donein classjavax.swing.SwingWorker<java.lang.Boolean,mgui.pipelines.PipelineLauncher.TaskEvent>
-
process
protected void process(java.util.List<mgui.pipelines.PipelineLauncher.TaskEvent> events)- Overrides:
processin classjavax.swing.SwingWorker<java.lang.Boolean,mgui.pipelines.PipelineLauncher.TaskEvent>
-
firePipelineTaskLaunched
protected void firePipelineTaskLaunched(mgui.pipelines.PipelineLauncher.TaskEvent event) -
firePipelineTaskTerminated
protected void firePipelineTaskTerminated(mgui.pipelines.PipelineLauncher.TaskEvent event) -
firePipelineTaskUpdated
protected void firePipelineTaskUpdated(mgui.pipelines.PipelineLauncher.TaskEvent event) -
firePipelineLaunched
protected void firePipelineLaunched(mgui.pipelines.PipelineLauncher.TaskEvent event) -
firePipelineTerminated
protected void firePipelineTerminated(mgui.pipelines.PipelineLauncher.TaskEvent event) -
pipelineLaunched
Description copied from interface:DynamicPipelineListenerCalled when a pipeline is initially launched- Specified by:
pipelineLaunchedin interfaceDynamicPipelineListener
-
pipelineTerminated
Description copied from interface:DynamicPipelineListenerCalled when a pipeline is terminated. The state of the pipeline can be queried via theStaticPipelineEventobject.- Specified by:
pipelineTerminatedin interfaceDynamicPipelineListener
-
pipelineTaskTerminated
Description copied from interface:DynamicPipelineListenerCalled when a pipeline task is terminated. The state of the pipeline can be queried via theStaticPipelineEventobject.- Specified by:
pipelineTaskTerminatedin interfaceDynamicPipelineListener
-
pipelineTaskUpdated
Description copied from interface:DynamicPipelineListenerCalled when a pipeline task requests to publish an update.- Specified by:
pipelineTaskUpdatedin interfaceDynamicPipelineListener
-
pipelineTaskLaunched
Description copied from interface:DynamicPipelineListenerCalled when a pipeline task is launched.- Specified by:
pipelineTaskLaunchedin interfaceDynamicPipelineListener
-