public class ReusablePluginWorkUnit extends PluginWorkUnit
ReusableInputProducer
and returned by getResult().
The calculation result should be fetched from the plugin later in the application
and returned to the input producer by calling
ReusableInputProducer.reuse(java.lang.Object).
You can use a CompositeInputProducer composed of a
ReusableInputProducer and a
MolInputProducer to provide the input for this work unit.MolInputProducer,
ReusableInputProducer,
CompositeInputProducerplugin, target| Constructor and Description |
|---|
ReusablePluginWorkUnit()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
call()
Performs the calculation and returns the result
returned by
getResult(). |
Object |
getResult()
Returns the plugin object itself.
|
Exception |
getWrapperException(Exception e)
Returns a wrapper exception to be returned.
|
void |
setInput(Object obj)
Sets the plugin object and the input molecule.
|
getHeader, setPluginpublic void setInput(Object obj) throws ExecutionException
setInput in interface WorkUnitsetInput in class PluginWorkUnitobj - a {plugin object, input molecule} object arrayExecutionExceptionpublic Object call() throws Exception
getResult().call in interface Callablecall in class PluginWorkUnitExceptionpublic Object getResult() throws Exception
ReusableInputProducer.reuse(java.lang.Object).getResult in class PluginWorkUnitExceptionpublic Exception getWrapperException(Exception e)
getWrapperException in class PluginWorkUnite - the base exception