public abstract class SubAssembly extends Pipe
Pipe
s 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.
The previous pipe (or pipes) must be passed on the super constructor, or set via setPrevious(Pipe...)
. This
allows the current SubAssembly to become the parent of any Pipe instances between the previous and the tails,
exclusive of the previous, and inclusive of the tails.
Subsequently all tail Pipes must be set via the setTails(Pipe...)
method.
Note if the SubAssembly represents a split in the pipeline process,
all the 'tails' of the assembly must be passed to setTails(Pipe...)
. It is up the the developer to
provide any other access to the tails so they may be chained into any subsequent Pipes.
Any ConfigDef
values on this SubAssembly will be honored by child Pipe instances via the
Pipe.getParent()
back link described above.configDef, name, nodeConfigDef, parent, stepConfigDef
Modifier | Constructor and Description |
---|---|
protected |
SubAssembly() |
protected |
SubAssembly(Pipe... previous) |
protected |
SubAssembly(String name,
Pipe[] previous) |
Modifier and Type | Method and Description |
---|---|
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 SubAssembly object.
|
Pipe[] |
getTails()
Method getTails returns all the tails of this SubAssembly object.
|
protected void |
setPrevious(Pipe... previous)
Must be called by subclasses to set the start end points of the assembly the subclass represents.
|
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 SubAssembly instances.
|
equals, getConfigDef, getHeads, getNodeConfigDef, getParent, getStepConfigDef, getTrace, hasConfigDef, hashCode, hasNodeConfigDef, hasStepConfigDef, id, isEquivalentTo, named, names, outgoingScopeFor, pipes, print, printInternal, resolveIncomingOperationArgumentFields, resolveIncomingOperationPassThroughFields, setParent, toString
protected SubAssembly()
protected SubAssembly(Pipe... previous)
protected SubAssembly(String name, Pipe[] previous)
public static Pipe[] unwind(Pipe... tails)
tails
- of type Pipe[]protected void setPrevious(Pipe... previous)
previous
- of type Pipeprotected void setTails(Pipe... tails)
tails
- of type Pipepublic Pipe[] getTails()
setTails(Pipe...)
.public String[] getTailNames()
public String getName()
Pipe
public Pipe[] getPrevious()
Pipe
getPrevious
in class Pipe
Copyright © 2007-2015 Concurrent, Inc. All Rights Reserved.