|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.enhydra.shark.toolagent.ToolAgentLoader
Use the static load
method to load classes that implement tool
agents from jars encountered in CLASSPATH like properties or located in a
plugin directory.
There a three properties that may be set in Shark's configuration file
(conf/Shark.conf).
ToolAgentClassPath
: This property specifies a colon separated list of
bytecode containers, i.e. jar files or directories containing class files.
Tool agent implementations found in one of these bytecode containers are
loaded by a single static class loader, i.e. they can not be reloaded during
the lifetime of the engine.ToolAgentPluginPath
: This property specifies a colon separated list of
bytecode containers, i.e. jar files or directories containing class files.
Tool agent implementations found in one of these bytecode containers are
loaded by individual class loaders, i.e. they are reloaded on each tool agent
invocation.ToolAgentPluginDir
: This property specifies a directory that may contain
jar files which are loaded as if they were encountered in the
ToolAgentPluginPath
.ToolAgentClassPath
and finally by an individual class loader according to the
ToolAgentPluginPath
.
That means that if you want your tool agent implementation to be reloadable
it must neither be encountered in the ToolAgentClassPath
nor in the default
CLASSPATH
.
If any of the properties mentioned above do not exist or are empty they will not be used for the search.
Note that classes that depend on your tool agent implementation are normally
loaded by the same class loader that looked up the tool agent's byte code.
That means that you can make even these classes being reloaded on each tool
agent invocation if the are encountered in the ToolAgentPluginPath
.
This feature is nice in the phase of development as you need not restart the whole workflow engine after you modified your tool agent classes or those classes it depends on.
If you think your classes do not change anymore move them from the
ToolAgentPluginPath
to the ToolAgentClassPath
to avoid unnecessary class
loading operations.
Constructor Summary | |
ToolAgentLoader()
|
Method Summary | |
static java.lang.Class |
load(CallbackUtilities cus,
java.lang.String name)
Load a tool agent class. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ToolAgentLoader()
Method Detail |
public static java.lang.Class load(CallbackUtilities cus, java.lang.String name) throws java.lang.ClassNotFoundException, java.io.IOException
cus
- callback utilities used to query shark's propertiesname
- name of the class
java.lang.ClassNotFoundException
- if tool agent class could not be found.
java.io.IOException
- if plugin dir could not be listed
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |