1 22 package org.jboss.monitor; 23 24 import javax.management.Notification ; 25 import javax.management.ObjectName ; 26 import java.util.Map ; 27 import java.util.HashMap ; 28 29 36 public class ThresholdNotification 37 extends JBossMonitorNotification 38 { 39 public static final String TRIGGERED_ATTRIBUTE_VALUE="TRIGGERED_ATTRIBUTE_VALUE"; 40 public static final String THRESHOLD = "THRESHOLD"; 41 42 private final Number value; 43 private final Number threshold; 44 45 public ThresholdNotification(String monitorName, ObjectName monitorObjectName, ObjectName observedObject, 46 String attribute, Number value, Number threshold, long sequenceNumber) 47 { 48 super(monitorName, monitorObjectName, observedObject, attribute, sequenceNumber); 49 this.value = value; 50 this.threshold = threshold; 51 } 52 53 public Number getValue() 54 { 55 return value; 56 } 57 58 public Number getThreshold() 59 { 60 return threshold; 61 } 62 63 69 public Map substitutionMap() 70 { 71 Map map = super.substitutionMap(); 72 map.put(TRIGGERED_ATTRIBUTE_VALUE, value); 73 map.put(THRESHOLD, threshold); 74 return map; 75 } 76 } 77 | Popular Tags |