public abstract class AbstractAsynchronousDependencyActivity extends AbstractAsynchronousActivity<com.fasterxml.jackson.databind.JsonNode>
Modifier and Type | Class and Description |
---|---|
static class |
AbstractAsynchronousDependencyActivity.ClassLoaderSharing
Different ways to share a class loader among activities:
workflow
Same classloader for all activities using the
workflow classloader sharing policy
system
System classloader
|
static class |
AbstractAsynchronousDependencyActivity.FileExtFilter
File filter.
|
Modifier and Type | Field and Description |
---|---|
protected ClassLoader |
classLoader
Classloader to be used for 'executing' this activity, depending on the activity's
class loader sharing policy.
|
File |
libDir
The location of the
lib directory in TAVERNA_HOME,
where local JAR files the activity depends on should be located. |
inputPortMapping, inputPorts, outputPortMapping, outputPorts
Constructor and Description |
---|
AbstractAsynchronousDependencyActivity(ApplicationConfiguration applicationConfiguration) |
Modifier and Type | Method and Description |
---|---|
protected ClassLoader |
findClassLoader(com.fasterxml.jackson.databind.JsonNode json,
String workflowRunID)
Finds or constructs the classloader.
|
ClassLoader |
getClassLoader() |
void |
setClassLoader(ClassLoader classLoader) |
configure, executeAsynch, getConfiguration
addInput, addOutput, addOutput, configurePorts, getEdits, getInputPortMapping, getInputPorts, getOutputPortMapping, getOutputPorts, removeInputs, removeOutputs, setEdits
getAddAnnotationEdit, getAnnotations, getRemoveAnnotationEdit, setAnnotations
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInputPortMapping, getInputPorts, getOutputPortMapping, getOutputPorts, setEdits
getAddAnnotationEdit, getAnnotations, getRemoveAnnotationEdit, setAnnotations
protected ClassLoader classLoader
public File libDir
lib
directory in TAVERNA_HOME,
where local JAR files the activity depends on should be located.public AbstractAsynchronousDependencyActivity(ApplicationConfiguration applicationConfiguration)
protected ClassLoader findClassLoader(com.fasterxml.jackson.databind.JsonNode json, String workflowRunID) throws RuntimeException
#ClassLoaderSharing
.
If the classloader sharing is AbstractAsynchronousDependencyActivity.ClassLoaderSharing.workflow
, a
common classloader will be used for the whole workflow for all activities
with the same (i.e. AbstractAsynchronousDependencyActivity.ClassLoaderSharing.workflow
) policy.
The dependencies will be constructed as union of local and artifact dependencies
of all 'workflow' classloader sharing activities at the point of the first
call to getClassLoader()
.
If the classloader sharing is AbstractAsynchronousDependencyActivity.ClassLoaderSharing.system
, the
system classloader will be used. Note that both local and artifact dependencies
configured on the activity will be ignored. Local dependencies can be set by
using -classpath
when starting the workbench.
This is useful in combination with JNI based libraries, which would also
require -Djava.library.path
and possibly the operating
system's PATH / LD_LIBRARY_PATH / DYLD_LIBRARY_PATH environment variable.
classLoaderSharing
- ClassLoader
according to the
classloader sharing policyRuntimeException
public void setClassLoader(ClassLoader classLoader)
classLoader
- the classLoader to setpublic ClassLoader getClassLoader()
Copyright © 2015–2016 The Apache Software Foundation. All rights reserved.