Package mgui.pipelines
Class PipelineFork
java.lang.Object
mgui.interfaces.AbstractInterfaceObject
mgui.pipelines.PipelineTask
mgui.pipelines.PipelineFork
- All Implemented Interfaces:
java.awt.datatransfer.Transferable,java.io.Serializable,java.lang.Cloneable,java.lang.Comparable<PipelineTask>,InterfaceObject,NamedObject,TaskTreeNodeListener,TreeObject,CleanableObject,XMLObject,IconObject
public class PipelineFork extends PipelineTask
Represents a fork in a pipeline; i.e., a branching point, where the output of the previous process becomes the
input of two or more independent pipelines. Tasks can be launched in parallel or in series, as determined by the
setLaunchParallel method.
The output of the fork is specified by the setOutputPipeline method.
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Andrew Reid
- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from class mgui.pipelines.PipelineTask
PipelineTask.StatusNested classes/interfaces inherited from interface mgui.interfaces.xml.XMLObject
XMLObject.XMLEncoding, XMLObject.XMLType -
Field Summary
Fields Modifier and Type Field Description protected static java.awt.datatransfer.DataFlavordata_flavorprotected booleanlaunch_parallelprotected InterfacePipelineoutput_pipelineprotected InterfacePipelinepipelineprotected java.util.LinkedList<InterfacePipeline>pipelinesFields inherited from class mgui.pipelines.PipelineTask
attributes, current, startFields inherited from class mgui.interfaces.AbstractInterfaceObject
isDestroyed, tree_nodes -
Constructor Summary
Constructors Constructor Description PipelineFork(java.lang.String name)PipelineFork(java.lang.String name, boolean launch_parallel)PipelineFork(java.lang.String name, boolean launch_parallel, java.util.Collection<InterfacePipeline> tasks)PipelineFork(java.lang.String name, boolean launch_parallel, java.util.Collection<InterfacePipeline> tasks, InterfacePipeline output_pipe) -
Method Summary
Modifier and Type Method Description java.awt.datatransfer.DataFlavorgetDataFlavor()java.lang.StringgetFailureMessage()Message to display if this task failedjavax.swing.ImageIcongetIcon()javax.swing.IcongetObjectIcon()Returns theIconassociated with this object.InterfacePipelinegetPipeline()intgetPipelineIndex(InterfacePipeline pipe)java.util.ArrayList<InterfacePipeline>getPipelines()java.lang.StringgetSuccessMessage()Message to display if this task terminated successfullyjava.util.LinkedList<InterfacePipeline>getTasks()voidinsert(int index, InterfacePipeline pipe)booleanlaunch()Launches this taskbooleanlaunch(boolean blocking)Launches this taskbooleanlaunch(java.lang.String instance, java.lang.String root)Launches this task with the given project instance and root directorybooleanlaunch(java.lang.String instance, java.lang.String root, boolean blocking)Launches this task with the given project instance and root directorybooleanlaunch(java.lang.String instance, InterfaceProject project, boolean blocking)voidpush(InterfacePipeline pipe)voidremove(InterfacePipeline pipe)voidsetOutputPipeline(InterfacePipeline output_pipe)voidsetPipeline(InterfacePipeline pipeline)java.lang.StringtoString()Methods inherited from class mgui.pipelines.PipelineTask
addListener, clone, compareTo, fireStatusChanged, getDTD, getElapsedTime, getLocalName, getName, getPipelineTreeLabel, getShortXML, getStatus, getStatusStr, getTransferData, getTransferDataFlavors, getXML, getXML, getXMLSchema, handleXMLElementEnd, handleXMLElementStart, handleXMLString, interrupt, isDataFlavorSupported, issueTreeNode, launch, removeListener, reset, setName, setStatus, treeNodeDetached, updateListeners, writeXML, writeXML, writeXMLMethods inherited from class mgui.interfaces.AbstractInterfaceObject
clean, destroy, getTreeLabel, isDestroyed, setTreeNode, updateTreeNodesMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
launch_parallel
protected boolean launch_parallel -
pipelines
-
pipeline
-
output_pipeline
-
data_flavor
protected static java.awt.datatransfer.DataFlavor data_flavor
-
-
Constructor Details
-
PipelineFork
public PipelineFork(java.lang.String name) -
PipelineFork
public PipelineFork(java.lang.String name, boolean launch_parallel) -
PipelineFork
public PipelineFork(java.lang.String name, boolean launch_parallel, java.util.Collection<InterfacePipeline> tasks) -
PipelineFork
public PipelineFork(java.lang.String name, boolean launch_parallel, java.util.Collection<InterfacePipeline> tasks, InterfacePipeline output_pipe)
-
-
Method Details
-
setOutputPipeline
-
push
-
insert
-
remove
-
getPipelineIndex
-
getTasks
-
getObjectIcon
public javax.swing.Icon getObjectIcon()Description copied from interface:IconObjectReturns theIconassociated with this object.- Returns:
-
getDataFlavor
public java.awt.datatransfer.DataFlavor getDataFlavor()- Specified by:
getDataFlavorin classPipelineTask
-
getSuccessMessage
public java.lang.String getSuccessMessage()Description copied from class:PipelineTaskMessage to display if this task terminated successfully- Specified by:
getSuccessMessagein classPipelineTask- Returns:
-
getFailureMessage
public java.lang.String getFailureMessage()Description copied from class:PipelineTaskMessage to display if this task failed- Specified by:
getFailureMessagein classPipelineTask- Returns:
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
getIcon
public javax.swing.ImageIcon getIcon() -
setPipeline
- Specified by:
setPipelinein classPipelineTask
-
getPipeline
- Specified by:
getPipelinein classPipelineTask
-
getPipelines
-
launch
Description copied from class:PipelineTaskLaunches this task- Specified by:
launchin classPipelineTask- Returns:
true, if this launch was successful- Throws:
PipelineException- If some exception was encountered during execution
-
launch
Description copied from class:PipelineTaskLaunches this task- Specified by:
launchin classPipelineTask- Parameters:
blocking- Indicates whether this task should block or return immediately- Returns:
true, if this launch was successful- Throws:
PipelineException- If some exception was encountered during execution
-
launch
Description copied from class:PipelineTaskLaunches this task with the given project instance and root directory- Specified by:
launchin classPipelineTask- Parameters:
instance- The project instance for which to launch this taskroot- The project root directory- Returns:
true, if this launch was successful- Throws:
PipelineException- If some exception was encountered during execution
-
launch
public boolean launch(java.lang.String instance, java.lang.String root, boolean blocking) throws PipelineExceptionDescription copied from class:PipelineTaskLaunches this task with the given project instance and root directory- Specified by:
launchin classPipelineTask- Parameters:
instance- The project instance for which to launch this taskroot- The project root directoryblocking- Indicates whether this task should block or return immediately- Returns:
true, if this launch was successful- Throws:
PipelineException- If some exception was encountered during execution
-
launch
public boolean launch(java.lang.String instance, InterfaceProject project, boolean blocking) throws PipelineException- Specified by:
launchin classPipelineTask- Throws:
PipelineException
-