org.embl.ebi.escience.scuflworkers.workflow
Class WorkflowProcessor

java.lang.Object
  extended by org.embl.ebi.escience.scufl.Processor
      extended by org.embl.ebi.escience.scuflworkers.workflow.WorkflowProcessor
All Implemented Interfaces:
java.io.Serializable, IProcessor, ScuflWorkflowProcessor

public class WorkflowProcessor
extends Processor
implements ScuflWorkflowProcessor, java.io.Serializable

A processor containing a full ScuflModel instance. Ports on the processor are directly copied in terms of names and types from the input and output ports of the underlying ScuflModel object.

Author:
Tom Oinn
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.embl.ebi.escience.scufl.IProcessor
ENACTOR
 
Constructor Summary
WorkflowProcessor(ScuflModel model, java.lang.String name)
          Construct a new processor with a blank internal workflow
WorkflowProcessor(ScuflModel model, java.lang.String name, org.jdom.Element scuflElement)
          Construct a new processor from the supplied JDOM element, this element being the 'scufl' top level workflow element from an inline nested workflow declaration
WorkflowProcessor(ScuflModel model, java.lang.String name, java.lang.String definitionURL)
          Construct a new processor with the given model to bind to, name and URL of a workflow description to contain.
 
Method Summary
 java.lang.String getDefinitionURL()
           
 ScuflModel getInternalModel()
           
 ScuflModel getInternalModelForEditing()
          Returns a ScuflModel that is being listened to by the processor So that any internal changes are automatically reflected in the processor The client is responsible for calling ScuflModel.removeListeners once the model is finished with.
 int getMaximumWorkers()
          Return the maximum number of task implementations that should be launched for this processor.
 java.util.Properties getProperties()
          Get the properties for this processor for display purposes
 void removeInternalModelEventListener()
          Removes the ScuflModelEventListener from the internal ScuflModel
 void setDefinitionURL(java.lang.String definitionURL)
           
 void setOffline()
          Go offline
 void setOnline()
          Go online
 
Methods inherited from class org.embl.ebi.escience.scufl.Processor
addAlternate, addAnnotationTemplate, addBreakpoint, addPort, defaultAnnotationTemplates, fireModelEvent, getAlternatesArray, getAlternatesList, getAnnotationTemplates, getBackoff, getBoundInputPorts, getBoundOutputPorts, getCritical, getDefaultWorkers, getDescription, getInputPorts, getIterationStrategy, getLogLevel, getModel, getName, getOutputPorts, getPorts, getRealLogLevel, getResourceHost, getRetries, getRetryDelay, getTimeout, getWorkers, hasBreakpoint, isBoring, isOffline, locatePort, locatePort, removeAlternate, removeAnnotationTemplate, removePort, rmvBreakpoint, setBackoff, setBoring, setCritical, setDescription, setIterationStrategy, setLogLevel, setName, setRetries, setRetryDelay, setTimeout, setWorkers, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WorkflowProcessor

public WorkflowProcessor(ScuflModel model,
                         java.lang.String name,
                         java.lang.String definitionURL)
                  throws ProcessorCreationException,
                         DuplicateProcessorNameException
Construct a new processor with the given model to bind to, name and URL of a workflow description to contain.

Throws:
ProcessorCreationException
DuplicateProcessorNameException

WorkflowProcessor

public WorkflowProcessor(ScuflModel model,
                         java.lang.String name,
                         org.jdom.Element scuflElement)
                  throws ProcessorCreationException,
                         DuplicateProcessorNameException
Construct a new processor from the supplied JDOM element, this element being the 'scufl' top level workflow element from an inline nested workflow declaration

Throws:
ProcessorCreationException
DuplicateProcessorNameException

WorkflowProcessor

public WorkflowProcessor(ScuflModel model,
                         java.lang.String name)
                  throws ProcessorCreationException,
                         DuplicateProcessorNameException
Construct a new processor with a blank internal workflow

Throws:
ProcessorCreationException
DuplicateProcessorNameException
Method Detail

setOffline

public void setOffline()
Go offline

Specified by:
setOffline in interface IProcessor
Overrides:
setOffline in class Processor

setOnline

public void setOnline()
Go online

Specified by:
setOnline in interface IProcessor
Overrides:
setOnline in class Processor

getMaximumWorkers

public int getMaximumWorkers()
Description copied from class: Processor
Return the maximum number of task implementations that should be launched for this processor. This is ignored unless the processor is being iterated over in which case a number of threads up to the value specified are created to process the information. You must be particularly careful that the task implementation is thread safe before changing this from the default specified here, at the current time the web service processor is not thread safe!

Specified by:
getMaximumWorkers in interface IProcessor
Overrides:
getMaximumWorkers in class Processor

removeInternalModelEventListener

public void removeInternalModelEventListener()
Removes the ScuflModelEventListener from the internal ScuflModel

Specified by:
removeInternalModelEventListener in interface ScuflWorkflowProcessor

getInternalModelForEditing

public ScuflModel getInternalModelForEditing()
Returns a ScuflModel that is being listened to by the processor So that any internal changes are automatically reflected in the processor The client is responsible for calling ScuflModel.removeListeners once the model is finished with.

Specified by:
getInternalModelForEditing in interface ScuflWorkflowProcessor
Returns:

getInternalModel

public ScuflModel getInternalModel()
Specified by:
getInternalModel in interface ScuflWorkflowProcessor

getProperties

public java.util.Properties getProperties()
Get the properties for this processor for display purposes

Specified by:
getProperties in interface IProcessor
Specified by:
getProperties in class Processor
Returns:
a Properties instance containing all processor-specific properties, or optinally null if there are none

getDefinitionURL

public java.lang.String getDefinitionURL()
Specified by:
getDefinitionURL in interface ScuflWorkflowProcessor

setDefinitionURL

public void setDefinitionURL(java.lang.String definitionURL)
Specified by:
setDefinitionURL in interface ScuflWorkflowProcessor