Package org.jboss.modules.management
Interface ModuleLoaderMXBean
-
public interface ModuleLoaderMXBean
An MXBean for getting runtime information about a module loader.- Author:
- David M. Lloyd
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
dumpAllModuleInformation()
Dump all information for all modules as a string.java.lang.String
dumpModuleInformation(java.lang.String name)
Dump all information for a single module as a string.int
getClassCount()
Get the number of classes defined in this module loader.long
getClassDefineTime()
Get the estimated CPU time (in nanoseconds) spent defining classes for this loader.java.lang.String
getClassLocation(java.lang.String moduleName, java.lang.String className)
Get the code source location of a class within a module.java.util.List<DependencyInfo>
getDependencies(java.lang.String name)
Get the dependencies of the named module.java.lang.String
getDescription()
Get a description of this module loader.long
getLinkTime()
Get the estimated CPU time (in nanoseconds) spent linking in the life of this module loader.int
getLoadedModuleCount()
Get the number of modules currently loaded.long
getLoadTime()
Get the estimated CPU time (in nanoseconds) spent loading modules into this loader.ModuleInfo
getModuleDescription(java.lang.String name)
Get the complete description of this module.java.util.SortedMap<java.lang.String,java.util.List<java.lang.String>>
getModulePathsInfo(java.lang.String name, boolean exports)
Get a paths map for a given module.int
getRaceCount()
Get the number of times a class was defined by two threads at once.java.util.List<ResourceLoaderInfo>
getResourceLoaders(java.lang.String name)
Get the resource loaders of the named module.int
getScanCount()
Get the number of times that dependencies of a module from this loader have been scanned.java.util.List<java.lang.String>
queryLoadedModuleNames()
Obtain a list of the current module names.void
refreshResourceLoaders(java.lang.String name)
Attempt to refresh the resource loaders of the given module.void
relink(java.lang.String name)
Attempt to relink the given module.boolean
unloadModule(java.lang.String name)
Attempt to unload a module from this module loader.
-
-
-
Method Detail
-
getDescription
java.lang.String getDescription()
Get a description of this module loader.- Returns:
- a description of this module loader
-
getLinkTime
long getLinkTime()
Get the estimated CPU time (in nanoseconds) spent linking in the life of this module loader.- Returns:
- the estimated time in nanoseconds
-
getLoadTime
long getLoadTime()
Get the estimated CPU time (in nanoseconds) spent loading modules into this loader.- Returns:
- the estimated time in nanoseconds
-
getClassDefineTime
long getClassDefineTime()
Get the estimated CPU time (in nanoseconds) spent defining classes for this loader.- Returns:
- the estimated time in nanoseconds
-
getScanCount
int getScanCount()
Get the number of times that dependencies of a module from this loader have been scanned.- Returns:
- the count
-
getLoadedModuleCount
int getLoadedModuleCount()
Get the number of modules currently loaded.- Returns:
- the loaded module count
-
getRaceCount
int getRaceCount()
Get the number of times a class was defined by two threads at once.- Returns:
- the race count
-
getClassCount
int getClassCount()
Get the number of classes defined in this module loader.- Returns:
- the number of classes defined in this module loader
-
queryLoadedModuleNames
java.util.List<java.lang.String> queryLoadedModuleNames()
Obtain a list of the current module names.- Returns:
- the module names
-
dumpModuleInformation
java.lang.String dumpModuleInformation(java.lang.String name)
Dump all information for a single module as a string.- Parameters:
name
- the module name- Returns:
- the string of module information
-
dumpAllModuleInformation
java.lang.String dumpAllModuleInformation()
Dump all information for all modules as a string.- Returns:
- the string of module information
-
unloadModule
boolean unloadModule(java.lang.String name)
Attempt to unload a module from this module loader.- Parameters:
name
- the string form of the module identifier to unload- Returns:
true
if the module was unloaded
-
refreshResourceLoaders
void refreshResourceLoaders(java.lang.String name)
Attempt to refresh the resource loaders of the given module.- Parameters:
name
- the name of the module to refresh
-
relink
void relink(java.lang.String name)
Attempt to relink the given module.- Parameters:
name
- the name of the module to relink
-
getDependencies
java.util.List<DependencyInfo> getDependencies(java.lang.String name)
Get the dependencies of the named module.- Parameters:
name
- the module name- Returns:
- the module's dependencies
-
getResourceLoaders
java.util.List<ResourceLoaderInfo> getResourceLoaders(java.lang.String name)
Get the resource loaders of the named module.- Parameters:
name
- the module name- Returns:
- the module's resource loaders
-
getModuleDescription
ModuleInfo getModuleDescription(java.lang.String name)
Get the complete description of this module.- Parameters:
name
- the module name- Returns:
- the module description
-
getModulePathsInfo
java.util.SortedMap<java.lang.String,java.util.List<java.lang.String>> getModulePathsInfo(java.lang.String name, boolean exports)
Get a paths map for a given module.- Parameters:
name
- the module nameexports
-true
for the exported paths,false
for all paths- Returns:
- the paths map information
-
getClassLocation
java.lang.String getClassLocation(java.lang.String moduleName, java.lang.String className)
Get the code source location of a class within a module.- Parameters:
moduleName
- the module nameclassName
- the class name- Returns:
- the location, or
null
if the class isn't found or the location cannot be determined
-
-