java.lang.Object
com.ibm.java.diagnostics.utils.plugins.impl.PluginManagerImpl
- All Implemented Interfaces:
PluginManager
Singleton manager for working with plugins.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddListener(ClassListener listener) Add a listener to the manager.getCache()URL[]<T extends Entry>
TGet an entry from the cache, using generics to describe the type expected.static PluginManagervoidRefresh the search path.booleanremoveListener(ClassListener listener) voidScan the supplied plugin path to find classes set by the plugin search path and then examine the classes to see if any of the correct interfaces and annotations are supported.
-
Field Details
-
logger
-
cache
the cache of scanned files for plugins -
pluginSearchPath
specify classloader paths by URI as this can be used by the File class and converted into a URL
-
-
Method Details
-
getPluginManager
-
refreshSearchPath
public void refreshSearchPath()Refresh the search path. This will take it's setting in order from 1. System property : com.ibm.java.diagnostics.plugins 2. Environment variable : com.ibm.java.diagnostics.plugins- Specified by:
refreshSearchPathin interfacePluginManager
-
scanForClassFiles
Scan the supplied plugin path to find classes set by the plugin search path and then examine the classes to see if any of the correct interfaces and annotations are supported. This method does not support MVS on z/OS, the path needs to point to HFS locations- Specified by:
scanForClassFilesin interfacePluginManager- Throws:
CommandException
-
getEntry
Get an entry from the cache, using generics to describe the type expected.- Type Parameters:
T-- Parameters:
file-- Returns:
-
getCache
- Specified by:
getCachein interfacePluginManager
-
addListener
Description copied from interface:PluginManagerAdd a listener to the manager. If the listener already exists as determined by a call to equals() then the existing instance is replace by the new one. This allows clients to install a single type of handler but update the configuration or it's methods of operation without retaining a handle to original listener.- Specified by:
addListenerin interfacePluginManager- Parameters:
listener- listener to add- Returns:
- result from the standard Set.add() method
-
removeListener
- Specified by:
removeListenerin interfacePluginManager
-
getListeners
- Specified by:
getListenersin interfacePluginManager
-
getClasspath
- Specified by:
getClasspathin interfacePluginManager
-