org.jboss.monitor.alarm
Class AlarmManager

java.lang.Object
  extended by org.jboss.monitor.alarm.AlarmManager

public class AlarmManager
extends Object

AlarmManager

Version:
$Revision: 57210 $
Author:
Dimitris Andreadis

Field Summary
protected  MBeanImplAccess mbeanImpl
          Mediates the related MBean
 
Constructor Summary
AlarmManager(MBeanImplAccess mbeanImpl)
          CTOR
AlarmManager(org.jboss.system.ServiceMBeanSupport service)
          CTOR
 
Method Summary
 void clear()
          Clear all the stored severities
 int getSeverity(javax.management.ObjectName name, String type)
          Gets the severity of an alarm, keyed by its type, for the specified mbean.
 int getSeverity(String type)
          Gets the severity of an alarm, keyed by its type, for the current mbean.
 String getSeverityAsString(javax.management.ObjectName name, String type)
          Gets the severity of an alarm as a String, keyed by its type for the specified mbean
 String getSeverityAsString(String type)
          Gets the severity of an alarm as a String, keyed by its type for the current mbean
 void sendAlarm(javax.management.ObjectName target, String type, int severity, String message, Object userData)
          Generates and sends an AlarmNotification.
 void sendAlarm(javax.management.ObjectName target, String type, int severity, String message, String key, Object value)
          Generates and sends an AlarmNotification.
 void sendAlarm(String type, int severity, String message, Object userData)
          Generates and sends an AlarmNotification.
 void sendAlarm(String type, int severity, String message, String key, Object value)
          Generates and sends an AlarmNotification.
protected  void sendAlarmNotification(javax.management.ObjectName target, String type, int severity, int alarmState, String message, Object userData)
          Generates and sends an AlarmNotification.
 void sendAttributeChangeNotification(String type, String message, Object userData, String attributeName, String attributeType, Object oldValue, Object newValue)
          Generates and sends an AttributeChangeNotification.
 void sendNotification(String type, String message, Object userData)
          Generates and sends a simple Notification.
 void setAlarm(javax.management.ObjectName target, String type, int severity, String message, Object userData)
          Sets the alarm for the specified target mbean, keyed by its type.
 void setAlarm(javax.management.ObjectName target, String type, int severity, String message, String key, 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 setAlarm(String type, int severity, String message, Object userData)
          Sets the alarm for the current mbean, keyed by its type.
 void setAlarm(String type, int severity, String message, String key, 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(javax.management.ObjectName name, String type, int severity)
          Sets the severity of an Alarm, keyed by its type, without producing an AlarmNotification, for the specified mbean.
 void setSeverity(String type, int severity)
          Sets the severity of an Alarm, keyed by its type, without producing an AlarmNotification, for the current mbean.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mbeanImpl

protected MBeanImplAccess mbeanImpl
Mediates the related MBean

Constructor Detail

AlarmManager

public AlarmManager(MBeanImplAccess mbeanImpl)
CTOR

Parameters:
mbeanImpl - providing access to notification broadcasting

AlarmManager

public AlarmManager(org.jboss.system.ServiceMBeanSupport service)
CTOR

Parameters:
service - hosting the AlarmManager
Method Detail

setSeverity

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


setSeverity

public void setSeverity(javax.management.ObjectName name,
                        String type,
                        int severity)
Sets the severity of an Alarm, keyed by its type, without producing an AlarmNotification, for the specified mbean.


getSeverity

public int getSeverity(String type)
Gets the severity of an alarm, keyed by its type, for the current mbean.


getSeverity

public int getSeverity(javax.management.ObjectName name,
                       String type)
Gets the severity of an alarm, keyed by its type, for the specified mbean.


getSeverityAsString

public String getSeverityAsString(String type)
Gets the severity of an alarm as a String, keyed by its type for the current mbean


getSeverityAsString

public String getSeverityAsString(javax.management.ObjectName name,
                                  String type)
Gets the severity of an alarm as a String, keyed by its type for the specified mbean


setAlarm

public void setAlarm(String type,
                     int severity,
                     String message,
                     Object userData)
Sets the alarm for the current mbean, keyed by its type. 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(javax.management.ObjectName target,
                     String type,
                     int severity,
                     String message,
                     Object userData)
Sets the alarm for the specified target mbean, keyed by its type. 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(String type,
                     int severity,
                     String message,
                     String key,
                     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 emitted if there is no severity change.


setAlarm

public void setAlarm(javax.management.ObjectName target,
                     String type,
                     int severity,
                     String message,
                     String key,
                     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.


sendAlarm

public void sendAlarm(String type,
                      int severity,
                      String message,
                      String key,
                      Object value)
Generates and sends an AlarmNotification. source, sequenceNumber, timeStamp will be automatically filled.


sendAlarm

public void sendAlarm(javax.management.ObjectName target,
                      String type,
                      int severity,
                      String message,
                      String key,
                      Object value)
Generates and sends an AlarmNotification. source, sequenceNumber, timeStamp will be automatically filled.


sendAlarm

public void sendAlarm(String type,
                      int severity,
                      String message,
                      Object userData)
Generates and sends an AlarmNotification. source, sequenceNumber, timeStamp will be automatically filled.


sendAlarm

public void sendAlarm(javax.management.ObjectName target,
                      String type,
                      int severity,
                      String message,
                      Object userData)
Generates and sends an AlarmNotification. source, sequenceNumber, timeStamp will be automatically filled.


sendAlarmNotification

protected void sendAlarmNotification(javax.management.ObjectName target,
                                     String type,
                                     int severity,
                                     int alarmState,
                                     String message,
                                     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(String type,
                                            String message,
                                            Object userData,
                                            String attributeName,
                                            String attributeType,
                                            Object oldValue,
                                            Object newValue)
Generates and sends an AttributeChangeNotification. source, sequenceNumber, timeStamp will be automatically filled in.


sendNotification

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


clear

public void clear()
Clear all the stored severities



Copyright © 2002 JBoss Group, LLC. All Rights Reserved.