FileDocCategorySizeDatePackage
WSMonitoringLevelListener.javaAPI DocGlassfish v2 API5281Fri May 04 22:24:42 BST 2007com.sun.enterprise.admin.wsmgmt.lifecycle

WSMonitoringLevelListener

public class WSMonitoringLevelListener extends Object implements com.sun.enterprise.admin.monitor.registry.MonitoringLevelListener
Provides an implementation of the MonitoringLevelListener interface to receive callbacks from admin regarding change in the monitoring level. Though there are 3 monitoring levels defined by JSR77, we support only 2 levels - OFF and ON (HIGH/LOW). So essentially, HIGH and LOW for us is only ON
author
Satish Viswanatham
since
s1aspe 9.0

Fields Summary
private com.sun.enterprise.admin.monitor.registry.MonitoringRegistry
registry_
private static final com.sun.enterprise.admin.monitor.registry.MonitoringLevel
OFF
private static final com.sun.enterprise.admin.monitor.registry.MonitoringLevel
HIGH
private static final com.sun.enterprise.admin.monitor.registry.MonitoringLevel
LOW
private static Logger
_logger
private String
ctxRoot
String
name
String
moduleName
boolean
isStandAlone
String
vs
String
j2eeAppName
boolean
isEjbModule
Constructors Summary
public WSMonitoringLevelListener(String n, String mName, String ctxRoot, boolean isa, String v, String appName, boolean isEjbM)

 // LogDomains.getLogger( LogDomains.RSR_LOGGER );

          
                
        name = n;
        moduleName = mName;
        this.ctxRoot = ctxRoot;
        isStandAlone = isa;
        vs = v;
        j2eeAppName = appName;
        isEjbModule = isEjbM;
    
Methods Summary
public voidchangeLevel(com.sun.enterprise.admin.monitor.registry.MonitoringLevel from, com.sun.enterprise.admin.monitor.registry.MonitoringLevel to, javax.management.j2ee.statistics.Stats handback)
This is the callback invoked by the MonitoringRegistry on change in monitoring level

param
from - the past level
param
to - the new level
param
handback - the Stats object this listener was registered for
deprecated


        try {
            new MonitoringLifeCycleImpl().instrumentMonitoring(name, 
                moduleName, ctxRoot, isStandAlone, vs, j2eeAppName, from, to,
                isEjbModule);
        } catch (Exception e) {
            // XXX log warning message
        }
    
public voidchangeLevel(com.sun.enterprise.admin.monitor.registry.MonitoringLevel from, com.sun.enterprise.admin.monitor.registry.MonitoringLevel to, com.sun.enterprise.admin.monitor.registry.MonitoredObjectType type)


        try {
            new MonitoringLifeCycleImpl().instrumentMonitoring(name, 
                moduleName, ctxRoot, isStandAlone, vs, j2eeAppName, from, to,
                isEjbModule);
        } catch (Exception e) {
            // XXX log warning message
        }
    
public voidsetLevel(com.sun.enterprise.admin.monitor.registry.MonitoringLevel level)

see
com.sun.enterprise.admin.monitor.registry.MonitoringLevelListener #setLevel(com.sun.enterprise.admin.monitor.registry.MonitoringLevel)
deprecated