public class Processor extends AbstractNamed implements Child<Workflow>, Ported
Processor
is a Workflow
component that controls the invocation of
activities.
When a Workflow
is run, a particular Activity
will be specified as bound to
the Processor
by the Profile
.
A Processor
contains an IterationStrategyStack
and a DispatchStack
and may have input
and output
ports.
AbstractCloneable.Cloning, AbstractCloneable.CopyVisitor
Constructor and Description |
---|
Processor()
Constructs a
Processor with a random UUID as the name and no parent
Workflow . |
Processor(Workflow parent,
String name)
Constructs a
Processor with the specified parent Workflow and name. |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(Visitor visitor)
Accepts a
Visitor to this WorkflowBean . |
DispatchStack |
getDispatchStack()
Returns the
DispatchStack or null if there is no
DispatchStack . |
NamedSet<InputProcessorPort> |
getInputPorts()
Returns the
NamedSet of input ports. |
IterationStrategyStack |
getIterationStrategyStack()
Returns the
IterationStrategyStack or null if there is no
IterationStrategyStack . |
NamedSet<OutputProcessorPort> |
getOutputPorts()
Returns the
NamedSet of output ports. |
Workflow |
getParent()
Returns the parent
Workflow of null if this Processor is an orphan. |
void |
setDispatchStack(DispatchStack dispatchStack)
Sets the
DispatchStack . |
void |
setInputPorts(Set<InputProcessorPort> inputPorts)
Sets the input ports.
|
void |
setIterationStrategyStack(IterationStrategyStack iterationStrategyStack)
Sets the
IterationStrategyStack . |
void |
setOutputPorts(Set<OutputProcessorPort> outputPorts)
Sets the output ports.
|
void |
setParent(Workflow parent)
Sets the parent of this workflow bean.
|
cloneInto, compareTo, equals, getName, hashCode, setName, toString
clone, cloneWorkflowBean
finalize, getClass, notify, notifyAll, wait, wait, wait
clone
public Processor()
Processor
with a random UUID as the name and no parent
Workflow
.public boolean accept(Visitor visitor)
WorkflowBean
Visitor
to this WorkflowBean
.accept
in interface WorkflowBean
visitor
- the Visitor
to accepttrue
if this WorkflowBeans
children should be visited.public DispatchStack getDispatchStack()
DispatchStack
or null
if there is no
DispatchStack
.DispatchStack
or null
if there is no
DispatchStack
public NamedSet<InputProcessorPort> getInputPorts()
NamedSet
of input ports.
Returns an empty NamedSet
if there are no input ports.getInputPorts
in interface Ported
public IterationStrategyStack getIterationStrategyStack()
IterationStrategyStack
or null
if there is no
IterationStrategyStack
.IterationStrategyStack
or null
if there is no
IterationStrategyStack
public NamedSet<OutputProcessorPort> getOutputPorts()
NamedSet
of output ports.
Returns an empty NamedSet
if there are no output ports.getOutputPorts
in interface Ported
public Workflow getParent()
Workflow
of null if this Processor
is an orphan.public void setDispatchStack(DispatchStack dispatchStack)
DispatchStack
.dispatchStack
- the DispatchStack
. Can be null
public void setInputPorts(Set<InputProcessorPort> inputPorts)
public void setIterationStrategyStack(IterationStrategyStack iterationStrategyStack)
IterationStrategyStack
.iterationStrategyStack
- the IterationStrategyStack
. Can be null
public void setOutputPorts(Set<OutputProcessorPort> outputPorts)
public void setParent(Workflow parent)
Child
Setting the parent would normally also add the object to the relevant collection in the parent if it does not already exist there.
If the child has an existing, object-identity different parent, the child will first be removed from the parent collection if it exists there.
Note:If the child is Named
the parent collection will be a
NamedSet
. This implicit insertion would overwrite any conflicting sibling with the
same Named.getName()
- to avoid this, add the child to the parent collection by using
NamedSet.addWithUniqueName(Named)
before setting the parent.
Copyright © 2013 myGrid. All rights reserved.