public class DispatchStack extends ArrayList<DispatchStackLayer> implements List<DispatchStackLayer>, Child<Processor>
DispatchStack
controls how a Processor
invokes an
Activity
.
A DispatchStack
consists of a list of DispatchStackLayer
s. A typical
DispatchStack
will contain DispatchStackLayer
s for parallelization,
retry, failover and invocation. The order of the layers controls the behavior of the
Processor
.
modCount
Constructor and Description |
---|
DispatchStack()
Constructs a
DispatchStack . |
DispatchStack(Processor parent)
Constructs a
DispatchStack for the specified Processor . |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(Visitor visitor)
Accepts a
Visitor to this WorkflowBean . |
WorkflowBean |
clone()
Create a deep clone of this bean.
|
Processor |
getParent()
Returns the parent of this workflow bean, or
null if it is orphan. |
URI |
getType()
TODO find out what this is for
|
void |
setParent(Processor parent)
Sets the parent of this workflow bean.
|
void |
setType(URI type)
TODO find out what this is for
|
String |
toString() |
add, add, addAll, addAll, clear, contains, ensureCapacity, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeRange, retainAll, set, size, subList, toArray, toArray, trimToSize
equals, hashCode
containsAll
public DispatchStack()
DispatchStack
.public DispatchStack(Processor parent)
DispatchStack
for the specified Processor
.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 Processor getParent()
Child
null
if it is orphan.public URI getType()
public void setParent(Processor 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.
public void setType(URI type)
type
- public WorkflowBean clone()
WorkflowBean
The cloned bean will have equivalent properties as the original bean. Any
Child
beans which parent match this bean will be cloned as well
(recursively), non-child beans will remain the same. If this bean is a
Child
, the returned clone will not have a parent set.
Note that children whose Child.getParent()
is null
might not be cloned, to avoid this, use
Scufl2Tools.setParents(uk.org.taverna.scufl2.api.container.WorkflowBundle)
before cloning.
clone
in interface WorkflowBean
clone
in class ArrayList<DispatchStackLayer>
public String toString()
toString
in class AbstractCollection<DispatchStackLayer>
Copyright © 2013 myGrid. All rights reserved.