Methods Summary |
---|
public void | changeLevel(com.sun.enterprise.admin.monitor.registry.MonitoringLevel from, com.sun.enterprise.admin.monitor.registry.MonitoringLevel to, com.sun.enterprise.admin.monitor.registry.MonitoredObjectType type)
if (MonitoredObjectType.HTTP_LISTENER.equals(type)) {
if(MonitoringLevel.OFF.equals(to)) {
isMonitoringEnabled = false;
} else {
isMonitoringEnabled = true;
}
}
String methodToInvoke = isMonitoringEnabled ? "enableMonitoring" :
"disabledMonitoring";
invokeGrizzly(methodToInvoke);
|
public void | changeLevel(com.sun.enterprise.admin.monitor.registry.MonitoringLevel from, com.sun.enterprise.admin.monitor.registry.MonitoringLevel to, javax.management.j2ee.statistics.Stats handback)
// deprecated, ignore
|
public static java.util.ArrayList | getGrizzlyConfigInstances()Return the list of all instance of this class.
return grizzlyConfigList;
|
public int | getPort()Return the port this configuration belongs.
return port;
|
public void | initConfig()
initMonitoringLevel();
|
private void | initMonitoringLevel()
try{
Config cfg = ServerBeansFactory
.getConfigBean(
WebContainer.getInstance().getServerContext().getConfigContext());
MonitoringLevel monitoringLevel = MonitoringLevel.OFF; // default per DTD
if (cfg.getMonitoringService() != null) {
ModuleMonitoringLevels levels =
cfg.getMonitoringService().getModuleMonitoringLevels();
if (levels != null) {
monitoringLevel = MonitoringLevel.instance(
levels.getHttpService());
}
}
if(MonitoringLevel.OFF.equals(monitoringLevel)) {
isMonitoringEnabled = false;
} else {
isMonitoringEnabled = true;
}
String methodToInvoke = isMonitoringEnabled ? "enableMonitoring" :
"disableMonitoring";
invokeGrizzly(methodToInvoke);
} catch (Exception ex) {
logger.log(Level.WARNING,
"selectorThread.initMonitoringException",
new Object[]{new Integer(port),ex});
}
|
protected final void | invokeGrizzly(java.lang.String methodToInvoke, java.lang.Object[] objects, java.lang.String[] signature)
try{
String onStr = domain + ":type=Selector,name=http" + port;
ObjectName objectName = new ObjectName(onStr);
mBeanServer.invoke(objectName,methodToInvoke,objects,signature);
} catch ( Exception ex ){
throw new RuntimeException(ex);
}
|
protected final void | invokeGrizzly(java.lang.String methodToInvoke)
invokeGrizzly(methodToInvoke,null,null);
|
public void | registerMonitoringLevelEvents()
MonitoringRegistry monitoringRegistry =
WebContainer.getInstance().getServerContext().getMonitoringRegistry();
monitoringRegistry.registerMonitoringLevelListener(
this, MonitoredObjectType.HTTP_LISTENER);
|
public final void | setEnableCallFlow(boolean enableCallFlow)Enable CallFlow gathering mechanism.
String methodToInvoke = enableCallFlow ? "enableMonitoring" :
"disabledMonitoring";
invokeGrizzly(methodToInvoke);
|
public void | setLevel(com.sun.enterprise.admin.monitor.registry.MonitoringLevel level)
// deprecated, ignore
|
public void | unregisterMonitoringLevelEvents()
MonitoringRegistry monitoringRegistry =
WebContainer.getInstance().getServerContext().getMonitoringRegistry();
monitoringRegistry.unregisterMonitoringLevelListener(this);
|