1 23 24 28 29 package com.sun.enterprise.admin.selfmanagement.event; 30 31 import javax.management.NotificationEmitter ; 32 import javax.management.MBeanServer ; 33 import javax.management.ObjectName ; 34 35 import com.sun.enterprise.config.serverbeans.ElementProperty; 36 import com.sun.enterprise.admin.selfmanagement.configuration.JavaBeanConfigurator; 37 import static com.sun.enterprise.admin.selfmanagement.event.ManagementRuleConstants.*; 38 39 44 public class LogEventFactory extends EventAbstractFactory{ 45 46 47 private LogEventFactory() { 48 super(); 49 EventBuilder.getInstance().addEventFactory(EVENT_LOG, this); 50 } 51 52 public Event instrumentEvent( 53 ElementProperty[] properties, String description ) { 54 LogEventFilter filter = new LogEventFilter(); 55 filter = (LogEventFilter)JavaBeanConfigurator.getInstance().configureBean( 56 filter, properties ); 57 LogEvent event = new LogEvent(filter,description); 58 return event; 59 } 60 61 static LogEventFactory getInstance() { 62 return instance; 63 } 64 65 66 private static LogEventFactory instance = new LogEventFactory(); 67 68 } 69 | Popular Tags |