org.embl.ebi.escience.scuflworkers.beanshell
Class BeanshellProcessor
java.lang.Object
org.embl.ebi.escience.scufl.Processor
org.embl.ebi.escience.scuflworkers.dependency.DependencyProcessor
org.embl.ebi.escience.scuflworkers.beanshell.BeanshellProcessor
- All Implemented Interfaces:
- java.io.Serializable, IProcessor
public class BeanshellProcessor
- extends DependencyProcessor
- implements java.io.Serializable
A processor that uses the Beanshell scripting engine
to allow arbitrary java scripts to be invoked on workflow
data. In this implementation all inputs and outputs
are strings, if this becomes a serious issue I guess we
can change it but for now this will do.
- Author:
- Tom Oinn
- See Also:
- Serialized Form
|
Constructor Summary |
BeanshellProcessor(ScuflModel model,
java.lang.String name,
java.lang.String script,
java.lang.String[] inputs,
java.lang.String[] outputs)
Construct a new processor with the given model and
name, delegates to the superclass and sets the
script up correctly along with the input and output
port name arrays. |
|
Method Summary |
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 |
java.lang.String |
getScript()
Get the script |
void |
setScript(java.lang.String theScript)
Set the script |
| 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, setOffline, setOnline, setRetries, setRetryDelay, setTimeout, setWorkers, toString |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
BeanshellProcessor
public BeanshellProcessor(ScuflModel model,
java.lang.String name,
java.lang.String script,
java.lang.String[] inputs,
java.lang.String[] outputs)
throws ProcessorCreationException,
DuplicateProcessorNameException
- Construct a new processor with the given model and
name, delegates to the superclass and sets the
script up correctly along with the input and output
port name arrays.
- Throws:
ProcessorCreationException
DuplicateProcessorNameException
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
setScript
public void setScript(java.lang.String theScript)
- Set the script
getScript
public java.lang.String getScript()
- Get the script
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