Search in sources :

Example 1 with ModuleMonitoringLevelsConfig

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);
}
Also used : MonitoringServiceConfig(com.sun.appserv.management.config.MonitoringServiceConfig) ModuleMonitoringLevelsConfig(com.sun.appserv.management.config.ModuleMonitoringLevelsConfig)

Example 2 with ModuleMonitoringLevelsConfig

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();
}
Also used : AttributeList(javax.management.AttributeList) ModuleMonitoringLevelsConfig(com.sun.appserv.management.config.ModuleMonitoringLevelsConfig)

Example 3 with ModuleMonitoringLevelsConfig

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);
}
Also used : ConfigConfig(com.sun.appserv.management.config.ConfigConfig) ModuleMonitoringLevelsConfig(com.sun.appserv.management.config.ModuleMonitoringLevelsConfig)

Example 4 with ModuleMonitoringLevelsConfig

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);
        }
    }
}
Also used : ModuleMonitoringLevelsConfig(com.sun.appserv.management.config.ModuleMonitoringLevelsConfig)

Aggregations

ModuleMonitoringLevelsConfig (com.sun.appserv.management.config.ModuleMonitoringLevelsConfig)4 ConfigConfig (com.sun.appserv.management.config.ConfigConfig)1 MonitoringServiceConfig (com.sun.appserv.management.config.MonitoringServiceConfig)1 AttributeList (javax.management.AttributeList)1