Class JVMStatusHelper
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.runtime.plugins.admin.jvmstatus.JVMStatusHelper
- All Implemented Interfaces:
MonitoringConstants,Initializable,Component,LogEnabled,Serviceable
public class JVMStatusHelper
extends AbstractLogEnabled
implements Component, Serviceable, Initializable, MonitoringConstants
This helper allow to get information or runs some operations on JVM system
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.runtime.plugins.admin.jvmstatus.monitoring.MonitoringConstants
MonitoringConstants.Period -
Field Summary
Fields inherited from interface org.ametys.runtime.plugins.admin.jvmstatus.monitoring.MonitoringConstants
FEEDING_PERIOD, RRD_EXT, RRD_STORAGE_DIRECTORY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRuns a garbage collector.Retrieves information about the general status of the systemRetrieves the monitoring datagetSamplingData(String sampleId) Get the RRD sample data to JSON formatRetrieves the monitoring datavoidvoidservice(ServiceManager manager) Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Constructor Details
-
JVMStatusHelper
public JVMStatusHelper()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
initialize
- Specified by:
initializein interfaceInitializable- Throws:
Exception
-
garbageCollect
Runs a garbage collector.- Returns:
- an empty map
-
getGeneralStatus
Retrieves information about the general status of the system- Returns:
- a map containing the general status information
-
getMonitoringData
Retrieves the monitoring data- Returns:
- a map containing the monitoring data
-
getSamplingData
Get the RRD sample data to JSON format- Parameters:
sampleId- the identifier of the sample to retrieve- Returns:
- the sample data as a JSON
- Throws:
IOException- if an error occurs
-
getSystemProperties
Retrieves the monitoring data- Returns:
- a map containing the monitoring data
-