1 23 24 31 package com.sun.enterprise.admin.event; 32 33 import com.sun.enterprise.admin.event.AdminEvent; 34 35 39 public class MonitoringEvent extends AdminEvent { 40 41 44 public static final String START_MONITORING = "start_monitoring"; 45 46 49 public static final String STOP_MONITORING = "stop_monitoring"; 50 51 54 public static final String GET_MONITOR_DATA = "get_monitoring"; 55 56 59 public static final String LIST_MONITORABLE = "list_monitorable"; 60 61 64 public static final String SET_MONITOR_DATA = "set_monitoring"; 65 66 69 static final String eventType = MonitoringEvent.class.getName(); 70 71 private String componentName; 72 private String actionCode; 73 private Object command; 74 75 83 public MonitoringEvent(String instance, String component, String action) { 84 this(instance, component, action, null); 85 } 86 87 99 public MonitoringEvent(String instance, String component, String action, 100 Object command) { 101 super(eventType, instance); 102 componentName = component; 103 actionCode = action; 104 this.command = command; 105 } 106 107 110 public String getComponentName() { 111 return componentName; 112 } 113 114 119 public String getActionCode() { 120 return actionCode; 121 } 122 123 129 public Object getCommand() { 130 return command; 131 } 132 133 136 public String toString() { 137 return "MonitoringEvent -- " + componentName + " -- " + actionCode; 138 } 139 } 140 | Popular Tags |