|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjp.go.aist.rtm.RTC.ModuleManager
public class ModuleManager
ModuleManager class
This is a class to manage for loading and unloading modules.
Field Summary | |
---|---|
protected boolean |
m_absoluteAllowed
Flag of absolute path when specify module for the load. |
protected java.util.Vector<java.lang.String> |
m_configPath
Configuration path list |
protected boolean |
m_downloadAllowed
Flag of URL when specify module for the load. |
protected java.lang.String |
m_initFuncPrefix
Initial execution function prefix |
protected java.lang.String |
m_initFuncSuffix
Initial execution function suffix |
protected java.util.Vector<java.lang.String> |
m_loadPath
Module load path list |
protected java.util.Map<java.lang.String,jp.go.aist.rtm.RTC.ModuleManager.DLLEntity> |
m_modules
Module list that has already loaded |
protected Properties |
m_properties
Module Manager properties |
Constructor Summary | |
---|---|
ModuleManager(Properties properties)
Constructor |
Method Summary | |
---|---|
void |
addLoadPath(java.util.Vector<java.lang.String> loadPath)
Add the module load path |
void |
allowAbsolutePath()
Allow absolute path when specify module path |
void |
allowModuleDownload()
Allow URL when specify module path |
void |
destruct()
destructer |
void |
disallowAbsolutePath()
Disallow absolute path when specify module path |
void |
disallowModuleDownload()
Disallow URL when specify module path |
protected void |
finalize()
finalize |
java.lang.String |
getInitFuncName(java.lang.String class_path)
Create initialization function symbol |
java.util.Vector<Properties> |
getLoadableModules()
Get the loadable module list |
java.util.Vector<Properties> |
getLoadedModules()
Get the module list that has been loaded |
java.util.Vector<java.lang.String> |
getLoadPath()
Get the module load path |
java.lang.String |
load(java.lang.String moduleName)
Load the module |
java.lang.String |
load(java.lang.String moduleName,
java.lang.String methodName)
Load and intialize the module |
void |
setLoadpath(java.util.Vector<java.lang.String> loadPath)
Set the module load path |
java.lang.reflect.Method |
symbol(java.lang.String class_name,
java.lang.String method_name)
Refer to the symbol of the method |
void |
unload(java.lang.String moduleName)
Unload the module |
void |
unloadAll()
Unload all modules |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Properties m_properties
protected java.util.Map<java.lang.String,jp.go.aist.rtm.RTC.ModuleManager.DLLEntity> m_modules
protected java.util.Vector<java.lang.String> m_loadPath
protected java.util.Vector<java.lang.String> m_configPath
protected boolean m_downloadAllowed
protected boolean m_absoluteAllowed
protected java.lang.String m_initFuncSuffix
protected java.lang.String m_initFuncPrefix
Constructor Detail |
---|
public ModuleManager(Properties properties)
Initialize based on information in the set Property object.
properties
-
Properties for initializationMethod Detail |
---|
public void destruct()
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public java.lang.String load(java.lang.String moduleName) throws java.lang.Exception
Load file_name as DLL or a shared liblary.
The file_name is specified by the relative path to default load
path (manager.modules.load_path).
If Property manager.modules.abs_path_allowed is yes,
the load module can be specified by the absolute path.
If Property manager.modules.download_allowed is yes,
the load module can be specified with URL.
The file_name can be specified by the absolute path.
If manager.modules.allowAbsolutePath is no, module of file_name
will be searched from the default module load path and loaded.
moduleName
-
The target module name for the loading
java.lang.Exception
public java.lang.String load(java.lang.String moduleName, java.lang.String methodName) throws java.lang.Exception
Load the specified file as DLL or a shared library, and execute operation for specified initialization.
moduleName
-
A module namemethodName
-
a initial method name
java.lang.IllegalArgumentException
-
When the argument is not correctly specified, it is thrown out.
java.lang.Exception
public void unload(java.lang.String moduleName) throws java.lang.Exception
Close and unload the specified module that has been loaded.
moduleName
-
Name of module for the unloading
java.lang.Exception
public void unloadAll()
Unload all modules that have been loaded.
public java.lang.reflect.Method symbol(java.lang.String class_name, java.lang.String method_name) throws java.lang.Exception
class_name
-
Name of classmethod_name
-
Name of method
java.lang.Exception
public java.lang.String getInitFuncName(java.lang.String class_path)
Assemble names of the initialization functions.
class_path
-
Name of module for initialization
public void setLoadpath(java.util.Vector<java.lang.String> loadPath)
Specify searching path to find the target module when loading module.
loadPath
-
List of module search pathpublic java.util.Vector<java.lang.String> getLoadPath()
Get the search path of the set module.
public void addLoadPath(java.util.Vector<java.lang.String> loadPath)
Add specified path list to search path list.
loadPath
-
List of additional module search pathpublic java.util.Vector<Properties> getLoadedModules()
Get the module list that has been loaded.
public java.util.Vector<Properties> getLoadableModules()
Get the loadable module list (not implemented).
public void allowAbsolutePath()
Set to allow the absolute path when specify the module for the load.
public void disallowAbsolutePath()
Set to disallow the absolute path when specify the module for the load.
public void allowModuleDownload()
Allow URL when specify module for the load. When this setup is allowed, downloading and loading the module will be allowed.
public void disallowModuleDownload()
Disallow URL when specify module for the load.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |