com.cisco.services.alarm
Class DefaultAlarm

java.lang.Object
  extended by com.cisco.services.alarm.DefaultAlarm
All Implemented Interfaces:
Alarm

public class DefaultAlarm
extends java.lang.Object
implements Alarm

An Implementation of the Alarm interface. The AlarmManager creates these Alarms when the createAlarm() method is called.


Field Summary
 
Fields inherited from interface com.cisco.services.alarm.Alarm
ALERTS, CRITICAL, DEBUGGING, EMERGENCIES, ERROR, HIGHEST_LEVEL, INFORMATIONAL, LOWEST_LEVEL, NO_SEVERITY, NOTIFICATION, UNKNOWN_MNEMONIC, WARNING
 
Constructor Summary
DefaultAlarm(java.lang.String facility, java.lang.String subFacility, int severity, AlarmWriter alarmWriter)
           
 
Method Summary
 java.lang.String getFacility()
           
 int getSeverity()
           
 java.lang.String getSubFacility()
           
 void send(java.lang.String mnemonic)
          Send the alarm with the specified mnemonic
 void send(java.lang.String mnemonic, ParameterList paramList)
          Send the alarm with the specified name and list of parameters.
 void send(java.lang.String mnemonic, java.lang.String paramName, java.lang.String paramValue)
          Send the alarm with the specified name and parameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAlarm

public DefaultAlarm(java.lang.String facility,
                    java.lang.String subFacility,
                    int severity,
                    AlarmWriter alarmWriter)
Method Detail

send

public void send(java.lang.String mnemonic)
Send the alarm with the specified mnemonic

Specified by:
send in interface Alarm
Parameters:
mnemonic - Mnemonic of the alarm

send

public void send(java.lang.String mnemonic,
                 java.lang.String paramName,
                 java.lang.String paramValue)
Send the alarm with the specified name and parameter

Specified by:
send in interface Alarm
Parameters:
mnemonic - Mnemonic of the alarm
paramName - Name of the parameter
paramValue - Value of the parameter

send

public void send(java.lang.String mnemonic,
                 ParameterList paramList)
Send the alarm with the specified name and list of parameters.

Specified by:
send in interface Alarm
Parameters:
mnemonic - Mnemonic of the alarm
paramList - A list of parameter name-value pairs

getFacility

public java.lang.String getFacility()
Specified by:
getFacility in interface Alarm
Returns:
the facility name of this Alarm

getSubFacility

public java.lang.String getSubFacility()
Specified by:
getSubFacility in interface Alarm
Returns:
the subfacility of this Alarm

getSeverity

public int getSeverity()
Specified by:
getSeverity in interface Alarm
Returns:
severity of the alarm, an integer in the range [0-7]