use of com.sun.appserv.management.config.ModuleMonitoringLevelsConfig in project Payara by payara.
the class ModuleMonitoringLevelsConfigTest method testCreateRemove.
public void testCreateRemove() {
ModuleMonitoringLevelsConfig existing = getModuleMonitoringLevelsConfig();
final MonitoringServiceConfig mon = getConfigConfig().getMonitoringServiceConfig();
mon.removeModuleMonitoringLevelsConfig();
final ModuleMonitoringLevelsConfig newMM = mon.createModuleMonitoringLevelsConfig(null);
}
use of com.sun.appserv.management.config.ModuleMonitoringLevelsConfig in project Payara by payara.
the class ModuleMonitoringLevelsConfigTest method testGetAll.
public void testGetAll() throws JMException, IOException {
final ModuleMonitoringLevelsConfig mml = getModuleMonitoringLevelsConfig();
final String[] allNames = new String[ModuleMonitoringLevelsConfig.ALL_LEVEL_NAMES.size()];
ModuleMonitoringLevelsConfig.ALL_LEVEL_NAMES.toArray(allNames);
final AttributeList attrs = Util.getExtra(mml).getAttributes(allNames);
assert allNames.length == attrs.size();
}
use of com.sun.appserv.management.config.ModuleMonitoringLevelsConfig in project Payara by payara.
the class AMXTestBase method getModuleMonitoringLevelsConfig.
protected ModuleMonitoringLevelsConfig getModuleMonitoringLevelsConfig(final String configName) {
final ConfigConfig cc = configName == null ? getConfigConfig() : getConfigConfig(configName);
assert (cc != null);
final ModuleMonitoringLevelsConfig mon = cc.getMonitoringServiceConfig().getModuleMonitoringLevelsConfig();
return (mon);
}
use of com.sun.appserv.management.config.ModuleMonitoringLevelsConfig in project Payara by payara.
the class AMXTestBase method setMonitoring.
/**
* Ensure that monitoring is enabled so that unit tests don't miss anything
*/
protected synchronized void setMonitoring(final String value) {
synchronized (AMXTestBase.class) {
final String[] configNames = getConfigNames();
for (int i = 0; i < configNames.length; ++i) {
final ModuleMonitoringLevelsConfig mml = getModuleMonitoringLevelsConfig(configNames[i]);
changeAllLevels(mml, value);
}
}
}
Aggregations