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.Status
Nested 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.DataFlavor
data_flavor
protected boolean
launch_parallel
protected InterfacePipeline
output_pipeline
protected InterfacePipeline
pipeline
protected java.util.LinkedList<InterfacePipeline>
pipelines
Fields inherited from class mgui.pipelines.PipelineTask
attributes, current, start
Fields 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.DataFlavor
getDataFlavor()
java.lang.String
getFailureMessage()
Message to display if this task failedjavax.swing.ImageIcon
getIcon()
javax.swing.Icon
getObjectIcon()
Returns theIcon
associated with this object.InterfacePipeline
getPipeline()
int
getPipelineIndex(InterfacePipeline pipe)
java.util.ArrayList<InterfacePipeline>
getPipelines()
java.lang.String
getSuccessMessage()
Message to display if this task terminated successfullyjava.util.LinkedList<InterfacePipeline>
getTasks()
void
insert(int index, InterfacePipeline pipe)
boolean
launch()
Launches this taskboolean
launch(boolean blocking)
Launches this taskboolean
launch(java.lang.String instance, java.lang.String root)
Launches this task with the given project instance and root directoryboolean
launch(java.lang.String instance, java.lang.String root, boolean blocking)
Launches this task with the given project instance and root directoryboolean
launch(java.lang.String instance, InterfaceProject project, boolean blocking)
void
push(InterfacePipeline pipe)
void
remove(InterfacePipeline pipe)
void
setOutputPipeline(InterfacePipeline output_pipe)
void
setPipeline(InterfacePipeline pipeline)
java.lang.String
toString()
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, writeXML
Methods inherited from class mgui.interfaces.AbstractInterfaceObject
clean, destroy, getTreeLabel, isDestroyed, setTreeNode, updateTreeNodes
Methods 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:IconObject
Returns theIcon
associated with this object.- Returns:
-
getDataFlavor
public java.awt.datatransfer.DataFlavor getDataFlavor()- Specified by:
getDataFlavor
in classPipelineTask
-
getSuccessMessage
public java.lang.String getSuccessMessage()Description copied from class:PipelineTask
Message to display if this task terminated successfully- Specified by:
getSuccessMessage
in classPipelineTask
- Returns:
-
getFailureMessage
public java.lang.String getFailureMessage()Description copied from class:PipelineTask
Message to display if this task failed- Specified by:
getFailureMessage
in classPipelineTask
- Returns:
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
getIcon
public javax.swing.ImageIcon getIcon() -
setPipeline
- Specified by:
setPipeline
in classPipelineTask
-
getPipeline
- Specified by:
getPipeline
in classPipelineTask
-
getPipelines
-
launch
Description copied from class:PipelineTask
Launches this task- Specified by:
launch
in classPipelineTask
- Returns:
true
, if this launch was successful- Throws:
PipelineException
- If some exception was encountered during execution
-
launch
Description copied from class:PipelineTask
Launches this task- Specified by:
launch
in 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:PipelineTask
Launches this task with the given project instance and root directory- Specified by:
launch
in 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:PipelineTask
Launches this task with the given project instance and root directory- Specified by:
launch
in 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:
launch
in classPipelineTask
- Throws:
PipelineException
-