public final class ProcessorImpl extends AbstractAnnotatedThing<Processor> implements Processor
Modifier and Type | Field and Description |
---|---|
protected List<Activity<?>> |
activityList |
protected List<org.apache.taverna.workflowmodel.impl.ConditionImpl> |
conditions |
protected List<org.apache.taverna.workflowmodel.impl.ConditionImpl> |
controlledConditions |
protected AbstractCrystalizer |
crystalizer |
protected DispatchStackImpl |
dispatchStack |
protected List<org.apache.taverna.workflowmodel.impl.ProcessorInputPortImpl> |
inputPorts |
protected IterationStrategyStackImpl |
iterationStack |
protected Map<String,Set<MonitorableProperty<?>>> |
monitorables |
protected String |
name |
protected List<org.apache.taverna.workflowmodel.impl.ProcessorOutputPortImpl> |
outputPorts |
int |
resultWrappingDepth |
Modifier | Constructor and Description |
---|---|
protected |
ProcessorImpl()
Create a new processor implementation with default blank iteration
strategy and dispatch stack.
|
Modifier and Type | Method and Description |
---|---|
void |
addObserver(Observer<ProcessorFinishedEvent> observer)
Register an
Observer |
boolean |
doTypeCheck()
When called this method configures input port filters and the
crystalizer, pushing cardinality information into outgoing datalinks.
|
void |
fire(String enclosingProcess,
InvocationContext context)
A processor with no inputs cannot be driven by the supply of data tokens
as it has nowhere to receive such tokens.
|
List<? extends Activity<?>> |
getActivityList()
A processor contains zero or more activities in an ordered list.
|
List<? extends Condition> |
getControlledPreconditionList()
A processor may control zero or more other processors within the same
level of the workflow through preconditions.
|
DispatchStackImpl |
getDispatchStack()
The dispatch stack pulls jobs from the queue generated by the iteration
system and handles the dispatch of these jobs to appropriate activity
workers
|
List<? extends ProcessorInputPort> |
getInputPorts()
Each processor has a list of zero or more input ports.
|
protected org.apache.taverna.workflowmodel.impl.ProcessorInputPortImpl |
getInputPortWithName(String name) |
IterationStrategyStackImpl |
getIterationStrategy()
The iteration strategy is responsible for combining input data events
into jobs which are then queued for execution through the dispatch stack
|
String |
getLocalName()
Every workflow level entity has a name which is unique within the
workflow in which it exists.
|
List<Observer<ProcessorFinishedEvent>> |
getObservers()
A list of all the currently registered
Observer s |
List<? extends ProcessorOutputPort> |
getOutputPorts()
Each processor has a list of zero or more output ports.
|
protected org.apache.taverna.workflowmodel.impl.ProcessorOutputPortImpl |
getOutputPortWithName(String name) |
List<? extends Condition> |
getPreconditionList()
A processor has zero or more preconditions explicitly declared.
|
void |
removeObserver(Observer<ProcessorFinishedEvent> observer)
Remove a class who is currently observing
|
protected void |
setName(String newName) |
String |
toString() |
getAddAnnotationEdit, getAnnotations, getRemoveAnnotationEdit, setAnnotations
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAddAnnotationEdit, getAnnotations, getRemoveAnnotationEdit, setAnnotations
protected List<org.apache.taverna.workflowmodel.impl.ConditionImpl> conditions
protected List<org.apache.taverna.workflowmodel.impl.ConditionImpl> controlledConditions
protected List<org.apache.taverna.workflowmodel.impl.ProcessorInputPortImpl> inputPorts
protected List<org.apache.taverna.workflowmodel.impl.ProcessorOutputPortImpl> outputPorts
protected AbstractCrystalizer crystalizer
protected DispatchStackImpl dispatchStack
protected IterationStrategyStackImpl iterationStack
protected String name
public transient int resultWrappingDepth
protected transient Map<String,Set<MonitorableProperty<?>>> monitorables
protected ProcessorImpl()
Create a new processor implementation with default blank iteration strategy and dispatch stack.
This constructor is protected to enforce that an instance can only be
created via the EditsImpl.createProcessor(String)
method.
public boolean doTypeCheck() throws IterationTypeMismatchException, InvalidDataflowException
doTypeCheck
in interface TokenProcessingEntity
IterationTypeMismatchException
- if the typing occured but didn't match because of an
iteration mismatchInvalidDataflowException
- if the entity depended on a dataflow that was not validprotected org.apache.taverna.workflowmodel.impl.ProcessorInputPortImpl getInputPortWithName(String name)
protected org.apache.taverna.workflowmodel.impl.ProcessorOutputPortImpl getOutputPortWithName(String name)
public void fire(String enclosingProcess, InvocationContext context)
Processor
public List<? extends Condition> getPreconditionList()
Processor
getPreconditionList
in interface Processor
public List<? extends Condition> getControlledPreconditionList()
Processor
getControlledPreconditionList
in interface Processor
public DispatchStackImpl getDispatchStack()
Processor
getDispatchStack
in interface Processor
public IterationStrategyStackImpl getIterationStrategy()
Processor
getIterationStrategy
in interface Processor
public List<? extends ProcessorInputPort> getInputPorts()
Processor
Processor inputs are instances of FilteringInputPort - they must have the filter depth set before any data events arrive at the Processor. In addition they assume that a full collection will be supplied, i.e. that there will be exactly one event at the end of the list of events for a given process ID with an index array of length zero.
getInputPorts
in interface Processor
getInputPorts
in interface TokenProcessingEntity
public List<? extends ProcessorOutputPort> getOutputPorts()
Processor
getOutputPorts
in interface Processor
getOutputPorts
in interface TokenProcessingEntity
public List<? extends Activity<?>> getActivityList()
Processor
getActivityList
in interface Processor
protected void setName(String newName)
public String getLocalName()
NamedWorkflowEntity
getLocalName
in interface NamedWorkflowEntity
public void addObserver(Observer<ProcessorFinishedEvent> observer)
Observable
Observer
addObserver
in interface Observable<ProcessorFinishedEvent>
observer
- the class who wants notified of changespublic List<Observer<ProcessorFinishedEvent>> getObservers()
Observable
Observer
sgetObservers
in interface Observable<ProcessorFinishedEvent>
public void removeObserver(Observer<ProcessorFinishedEvent> observer)
Observable
removeObserver
in interface Observable<ProcessorFinishedEvent>
observer
- the class who no longer wants notifiedCopyright © 2015–2016 The Apache Software Foundation. All rights reserved.