org.jboss.monitor.alarm
Class AlarmManager

java.lang.Object
  extended byorg.jboss.monitor.alarm.AlarmManager

public class AlarmManager
extends java.lang.Object

AlarmManager


Field Summary
protected  MBeanImplAccess (src) mbeanImpl
           
 
Constructor Summary
AlarmManager(MBeanImplAccess (src)  mbeanImpl)
          CTOR
 
Method Summary
 int getSeverity(java.lang.String type)
          Gets the severity of an alarm, keyed by its type.
 java.lang.String getSeverityAsString(java.lang.String type)
          Gets the severity of an alarm, keyed by its type, as String
 void sendAlarmNotification(java.lang.String type, int alarmState, int severity, java.lang.String message, java.lang.Object userData)
          Generates and sends an AlarmNotification.
 void sendAlarmNotification(java.lang.String type, int alarmState, int severity, java.lang.String message, java.lang.String key, java.lang.Object value)
          Generates and sends an AlarmNotification Essentially a helper method that will populate the userData field of the Notification with a HashMap, containing a single key/value pair.
 void sendAttributeChangeNotification(java.lang.String type, java.lang.String message, java.lang.Object userData, java.lang.String attributeName, java.lang.String attributeType, java.lang.Object oldValue, java.lang.Object newValue)
          Generates and sends an AttributeChangeNotification.
 void sendNotification(java.lang.String type, java.lang.String message, java.lang.Object userData)
          Generates and sends a simple Notification.
 void setAlarm(java.lang.String type, int severity, java.lang.String message, java.lang.Object userData)
          Sets the alarm, keyed by its type, to a particular state.
 void setAlarm(java.lang.String type, int severity, java.lang.String message, java.lang.String key, java.lang.Object value)
          See set Alarm above Essentially a helper method that will populate the userData field of the Notification with a HashMap, containing a single key/value pair.
 void setSeverity(java.lang.String type, int severity)
          Sets the severity of an Alarm, keyed by its type, without producing an AlarmNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mbeanImpl

protected MBeanImplAccess (src)  mbeanImpl
Constructor Detail

AlarmManager

public AlarmManager(MBeanImplAccess (src)  mbeanImpl)
CTOR

Method Detail

setSeverity

public void setSeverity(java.lang.String type,
                        int severity)
Sets the severity of an Alarm, keyed by its type, without producing an AlarmNotification


getSeverity

public int getSeverity(java.lang.String type)
Gets the severity of an alarm, keyed by its type.


getSeverityAsString

public java.lang.String getSeverityAsString(java.lang.String type)
Gets the severity of an alarm, keyed by its type, as String


setAlarm

public void setAlarm(java.lang.String type,
                     int severity,
                     java.lang.String message,
                     java.lang.Object userData)
Sets the alarm, keyed by its type, to a particular state. If severity has changed an AlarmNotification will be thrown. The alarmState of the AlarmNotification will be either Alarm.STATE_CREATED, Alarm.STATE_CHANGED or Alarm.STATE_CLEARED.


setAlarm

public void setAlarm(java.lang.String type,
                     int severity,
                     java.lang.String message,
                     java.lang.String key,
                     java.lang.Object value)
See set Alarm above Essentially a helper method that will populate the userData field of the Notification with a HashMap, containing a single key/value pair. Note, that an AlarmNotification will not be thrown if there is no severity change.


sendAlarmNotification

public void sendAlarmNotification(java.lang.String type,
                                  int alarmState,
                                  int severity,
                                  java.lang.String message,
                                  java.lang.String key,
                                  java.lang.Object value)
Generates and sends an AlarmNotification Essentially a helper method that will populate the userData field of the Notification with a HashMap, containing a single key/value pair.


sendAlarmNotification

public void sendAlarmNotification(java.lang.String type,
                                  int alarmState,
                                  int severity,
                                  java.lang.String message,
                                  java.lang.Object userData)
Generates and sends an AlarmNotification. An alarmState of Alarm.STATE_CLEARED forces severity to SEVERITY_NORMAL source, sequenceNumber, timeStamp will be automatically filled.


sendAttributeChangeNotification

public void sendAttributeChangeNotification(java.lang.String type,
                                            java.lang.String message,
                                            java.lang.Object userData,
                                            java.lang.String attributeName,
                                            java.lang.String attributeType,
                                            java.lang.Object oldValue,
                                            java.lang.Object newValue)
Generates and sends an AttributeChangeNotification. source, sequenceNumber, timeStamp will be automatically filled in.


sendNotification

public void sendNotification(java.lang.String type,
                             java.lang.String message,
                             java.lang.Object userData)
Generates and sends a simple Notification. source, sequenceNumber, timeStamp will be automatically filled in.