1 22 package org.jboss.monitor; 23 24 import javax.management.Notification ; 25 import javax.management.ObjectName ; 26 import java.util.Map ; 27 28 35 public class StringThresholdNotification 36 extends JBossMonitorNotification 37 { 38 public static final String TRIGGERED_ATTRIBUTE_VALUE="TRIGGERED_ATTRIBUTE_VALUE"; 39 public static final String THRESHOLD = "THRESHOLD"; 40 41 private final String value; 42 private final String threshold; 43 private final boolean equality; 44 45 public StringThresholdNotification(String monitorName, ObjectName monitorObjectName, ObjectName observedObject, 46 String attribute, String value, String threshold, boolean equality, long sequenceNumber) 47 { 48 super(monitorName, monitorObjectName, observedObject, attribute, sequenceNumber); 49 this.value = value; 50 this.threshold = threshold; 51 this.equality = equality; 52 } 53 54 public String getValue() 55 { 56 return value; 57 } 58 59 public String getThreshold() 60 { 61 return threshold; 62 } 63 64 65 public boolean getEquality() 66 { 67 return equality; 68 } 69 70 76 public Map substitutionMap() 77 { 78 Map map = super.substitutionMap(); 79 map.put(TRIGGERED_ATTRIBUTE_VALUE, value); 80 map.put(THRESHOLD, threshold); 81 return map; 82 } 83 } 84 | Popular Tags |