cascading.pipe
Class SubAssembly

java.lang.Object
  extended by cascading.pipe.Pipe
      extended by cascading.pipe.SubAssembly
All Implemented Interfaces:
FlowElement, Serializable
Direct Known Subclasses:
AggregateBy, Coerce, Rename, Shape, Unique

public abstract class SubAssembly
extends Pipe

Subclasses of SubAssembly encapsulate complex assemblies of Pipes so they my be reused in the same manner a Pipe is used.

That is, a typical SubAssembly subclass will accept a 'previous' Pipe instance, and a few arguments for configuring the resulting sub-assembly.

If the SubAssembly represents a split in the pipeline process, all the 'tails' of the assembly must be passed to setTails(Pipe...).

See Also:
Serialized Form

Field Summary
 
Fields inherited from class cascading.pipe.Pipe
previous
 
Constructor Summary
SubAssembly()
           
 
Method Summary
 String getName()
          Get the name of this pipe.
 Pipe[] getPrevious()
          Get all the upstream pipes this pipe is connected to.
 String[] getTailNames()
          Method getTailNames returns the tailNames of this PipeAssembly object.
 Pipe[] getTails()
          Method getTails returns all the tails of this PipeAssembly object.
protected  void setTails(Pipe... tails)
          Must be called by subclasses to set the final end points of the assembly the subclass represents.
static Pipe[] unwind(Pipe... tails)
          Is responsible for unwinding nested PipeAssembly instances.
 
Methods inherited from class cascading.pipe.Pipe
equals, getHeads, getTrace, hashCode, isEquivalentTo, names, outgoingScopeFor, pipes, print, printInternal, resolveFields, resolveIncomingOperationFields, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SubAssembly

public SubAssembly()
Method Detail

setTails

protected void setTails(Pipe... tails)
Must be called by subclasses to set the final end points of the assembly the subclass represents.

Parameters:
tails - of type Pipe

getTails

public Pipe[] getTails()
Method getTails returns all the tails of this PipeAssembly object. These values are set by setTails(Pipe...).

Returns:
the tails (type Pipe[]) of this PipeAssembly object.

getTailNames

public String[] getTailNames()
Method getTailNames returns the tailNames of this PipeAssembly object.

Returns:
the tailNames (type String[]) of this PipeAssembly object.

getName

public String getName()
Description copied from class: Pipe
Get the name of this pipe. Guaranteed non-null.

Overrides:
getName in class Pipe
Returns:
String the name of this pipe

getPrevious

public Pipe[] getPrevious()
Description copied from class: Pipe
Get all the upstream pipes this pipe is connected to. This method will return the Pipe instances passed on the constructors as inputs to this Pipe instance.

Overrides:
getPrevious in class Pipe
Returns:
all the upstream pipes this pipe is connected to.

unwind

public static Pipe[] unwind(Pipe... tails)
Is responsible for unwinding nested PipeAssembly instances.

Parameters:
tails - of type Pipe[]
Returns:
a Pipe[]


Copyright © 2007-2010 Concurrent, Inc. All Rights Reserved.