Interface AbstractMonitorMBean
- All Superinterfaces:
Runnable, Shutdownable
- All Known Subinterfaces:
ClasspathMonitorMBean, ConnectionMonitorMBean, ResourcepathMonitorMBean
- All Known Implementing Classes:
AbstractMonitor, AbstractStatistic, ClasspathMonitor, ConnectionMonitor, ResourcepathMonitor, SqlStatistic
Some common interface methods for a monitor MBean are listed here.
Originally this interface was part of the PatternTesting project.
- Author:
- oliver
-
Method Summary
Modifier and TypeMethodDescriptiondumpMe()This operation dumps the different MBean attributes to a temporary file with a common prefix (the name of the class, e.g.voidThis operation dumps the different MBean attributes to the given directory.This operations gives you the directory where the different MBeans attributes are dumped to.voidlogMe()Prints the different MBean attributes to the log output.Methods inherited from interface Shutdownable
addMeAsShutdownHook, isShutdownHook, removeMeAsShutdownHookModifier and TypeMethodDescriptionvoidTo be able to register the instance as shutdown hook you can use this (non static) method.booleanHere you can ask if the instance was already registeres ad shutdown hook.voidIf you want to unregister the instance as shutdown hook you can use this method.
-
Method Details
-
logMe
Prints the different MBean attributes to the log output. -
dumpMe
This operation dumps the different MBean attributes to a temporary file with a common prefix (the name of the class, e.g. ClasspathMonitor) and the extension ".txt".To be able to see the name of the temporary file in the 'jconsole' it should be returned as value.
- Returns:
- the temporary file
- Throws:
IOException- Signals that an I/O exception has occurred.
-
dumpMe
@Description("dumps all attributs to the given directory") void dumpMe(String dirname) throws IOException This operation dumps the different MBean attributes to the given directory.- Parameters:
dirname- the directory name- Throws:
IOException- Signals that an I/O exception has occurred.
-
getDumpDir
This operations gives you the directory where the different MBeans attributes are dumped to.- Returns:
- the dump directory
- Since:
- 2.3
-