Class PipelineFork

java.lang.Object
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
  • Field Details

    • launch_parallel

      protected boolean launch_parallel
    • pipelines

      protected java.util.LinkedList<InterfacePipeline> pipelines
    • pipeline

      protected InterfacePipeline pipeline
    • output_pipeline

      protected InterfacePipeline 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

      public void setOutputPipeline​(InterfacePipeline output_pipe)
    • push

      public void push​(InterfacePipeline pipe)
    • insert

      public void insert​(int index, InterfacePipeline pipe)
    • remove

      public void remove​(InterfacePipeline pipe)
    • getPipelineIndex

      public int getPipelineIndex​(InterfacePipeline pipe)
    • getTasks

      public java.util.LinkedList<InterfacePipeline> getTasks()
    • getObjectIcon

      public javax.swing.Icon getObjectIcon()
      Description copied from interface: IconObject
      Returns the Icon associated with this object.
      Returns:
    • getDataFlavor

      public java.awt.datatransfer.DataFlavor getDataFlavor()
      Specified by:
      getDataFlavor in class PipelineTask
    • getSuccessMessage

      public java.lang.String getSuccessMessage()
      Description copied from class: PipelineTask
      Message to display if this task terminated successfully
      Specified by:
      getSuccessMessage in class PipelineTask
      Returns:
    • getFailureMessage

      public java.lang.String getFailureMessage()
      Description copied from class: PipelineTask
      Message to display if this task failed
      Specified by:
      getFailureMessage in class PipelineTask
      Returns:
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • getIcon

      public javax.swing.ImageIcon getIcon()
    • setPipeline

      public void setPipeline​(InterfacePipeline pipeline)
      Specified by:
      setPipeline in class PipelineTask
    • getPipeline

      public InterfacePipeline getPipeline()
      Specified by:
      getPipeline in class PipelineTask
    • getPipelines

      public java.util.ArrayList<InterfacePipeline> getPipelines()
    • launch

      public boolean launch() throws PipelineException
      Description copied from class: PipelineTask
      Launches this task
      Specified by:
      launch in class PipelineTask
      Returns:
      true, if this launch was successful
      Throws:
      PipelineException - If some exception was encountered during execution
    • launch

      public boolean launch​(boolean blocking) throws PipelineException
      Description copied from class: PipelineTask
      Launches this task
      Specified by:
      launch in class PipelineTask
      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

      public boolean launch​(java.lang.String instance, java.lang.String root) throws PipelineException
      Description copied from class: PipelineTask
      Launches this task with the given project instance and root directory
      Specified by:
      launch in class PipelineTask
      Parameters:
      instance - The project instance for which to launch this task
      root - 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 PipelineException
      Description copied from class: PipelineTask
      Launches this task with the given project instance and root directory
      Specified by:
      launch in class PipelineTask
      Parameters:
      instance - The project instance for which to launch this task
      root - The project root directory
      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

      public boolean launch​(java.lang.String instance, InterfaceProject project, boolean blocking) throws PipelineException
      Specified by:
      launch in class PipelineTask
      Throws:
      PipelineException