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

LogEvent

public class LogEvent extends Object implements Event
author
hemanth

Fields Summary
private static final com.sun.enterprise.util.i18n.StringManager
sm
private static final Logger
_logger
private static volatile ObjectName
objName
private static final String
defaultDescription
private final String
description
private final LogEventFilter
notificationFilter
Constructors Summary
public LogEvent(LogEventFilter filter, String descriptionIn)
Creates a new instance of LogEvent

    
           
         
          
           
        notificationFilter = filter;
        description = descriptionIn != null ? descriptionIn : defaultDescription;
    
Methods Summary
public voiddestroy()

        // do nothing
    
public java.lang.StringgetDescription()

        return description;
    
static javax.management.ObjectNamegetLogObjectName()

        if (objName != null)  // MUST be 'volatile' for this test to work.
            return objName; 
            
        synchronized( LogEvent.class ) {
            try {
                objName =  new ObjectName( "amx:j2eeType=X-Logging,name="+
                        System.getProperty(SystemPropertyConstants.SERVER_NAME )+
                        ",X-ServerRootMonitor=" +
                        System.getProperty(SystemPropertyConstants.SERVER_NAME ));
                final MBeanServer mbeanServer = MBeanServerFactory.getMBeanServer();
                if (mbeanServer.isRegistered(objName)) {
                    return objName;
                } else
                    _logger.log(Level.WARNING,"smgt.internal_error",
                            new Object[] {sm.getString("selfmgmt_event.log_mbean_is_not_available")});
            }catch (MalformedObjectNameException mex) {
                _logger.log(Level.WARNING,"smgt.internal_error", mex);
            }
        }
        return objName;
        
    
public javax.management.NotificationFiltergetNotificationFilter()

        return notificationFilter;
    
public javax.management.ObjectNamegetObjectName()

        return getLogObjectName();
    
public java.lang.StringgetType()

        return "log";