FileDocCategorySizeDatePackage
MonitorEvent.javaAPI DocGlassfish v2 API4646Fri May 04 22:33:44 BST 2007com.sun.enterprise.admin.selfmanagement.event

MonitorEvent

public class MonitorEvent extends Object implements Event

Fields Summary
private static Logger
_logger
private static com.sun.enterprise.util.i18n.StringManager
sm
private ObjectName
objName
private static String
description
private static String
defaultDescription
private StatisticMonitor
sMonitor
private Monitor
monitor
Constructors Summary
MonitorEvent(StatisticMonitor monitor, ObjectName objName, String description)

    
          
        monitor.start();
        try {
            MBeanServerFactory.getMBeanServer().registerMBean(monitor,objName);
        } catch (Exception ex) {
            _logger.log(Level.WARNING,"smgt.internal_error", ex);
        }
        
        this.sMonitor = monitor;
        this.objName = objName;
        if (description != null)
            this.description = description;
        else
            this.description = defaultDescription;
    
MonitorEvent(Monitor monitor, ObjectName objName, String description)

        monitor.start();
        try {
            MBeanServerFactory.getMBeanServer().registerMBean(monitor,objName);
        } catch (Exception ex) {
            _logger.log(Level.WARNING,"smgt.internal_error", ex);
        }

        this.monitor = monitor;
        this.objName = objName;
        if (description != null)
            this.description = description;
        else
            this.description = defaultDescription;
    
Methods Summary
public voiddestroy()

        try {
        if (monitor != null)
            monitor.stop();
        if (sMonitor != null)
            sMonitor.stop();
        } catch (Exception ex) {
            _logger.log(Level.WARNING,"smgt.internal_error", ex);
        }
        try {
            MBeanServerFactory.getMBeanServer().unregisterMBean(objName);
        } catch (Exception ex) {
            _logger.log(Level.WARNING,"smgt.internal_error", ex);
        }
    
public java.lang.StringgetDescription()

        return description;
    
public javax.management.NotificationFiltergetNotificationFilter()

        return null;
    
public javax.management.ObjectNamegetObjectName()

        return objName;
    
public java.lang.StringgetType()

        return "monitor";