com.cisco.services.alarm
Interface Alarm

All Known Implementing Classes:
DefaultAlarm

public interface Alarm

The Alarm interface is used to define Alarms in. An Alarm has an XML representation that it must adhere to in order to be recognized by the Alarm Service, with a DTD as shown below. An application can implement this interface or use the AlarmFactory to generate Alarms of the correct format. The Alarm is the a specification that needs to be sent to an AlarmService that will take some action based on the Alarm. Using this specification the AlarmService will access definitions available in a catalog. This catalog is maintained by the user requiring the Alarm function to effect the appropriate action for the Alarm. The severity specified the Alarm can over-ride the severity associated with this Alarm in the catalog. If no severity is specified in the Alarm the catalog severity is used.

Alarm severities are derived from Syslog and are defined as follows:
0 = EMERGENCIES System unusable
1 = ALERTS Immediate action needed
2 = CRITICAL Critical conditions
3 = ERROR Error conditions
4 = WARNING Warning conditions
5 = NOTIFICATION Normal but significant condition
6 = INFORMATIONAL Informational messages only
7 = DEBUGGING Debugging messages


Field Summary
static int ALERTS
          The application will continue working on the tasks but all functions may not be operational (one or more devices in the list are not accessible but others in the list can be accessed)
Syslog severity level = 1
static int CRITICAL
          A critical failure, the application can not accomplish the tasks required due to this failure, eg: the app can't open the database to read the device list
Syslog severity level = 2
static int DEBUGGING
          Very detailed information regarding errors or processing status that is only generated when DEBUG mode has been enabled
Syslog severity level = 7
static int EMERGENCIES
          Emergency situation, a system shutdown is necessary
Syslog severity level = 0
static int ERROR
          An error condition of some kind has occurred and the user needs to understand the nature of that failure
Syslog severity level = 3
static int HIGHEST_LEVEL
          The highest trace level, currently this is DEBUGGING with a trace level of 7
static int INFORMATIONAL
          Information of some form not relating to errors, warnings, audit, or debug
Syslog severity level =6
static int LOWEST_LEVEL
          The lowest trace level, currently this is EMERGENCIES with a trace level of 0
static int NO_SEVERITY
          Applications can set this level to generate Alarms without a severity.
static int NOTIFICATION
          Notification denotes a normal but significant condition
Syslog severity level = 5
static java.lang.String UNKNOWN_MNEMONIC
          String used when a mnemonic is not specifed during an Alarm send
static int WARNING
          Warning that a problem of some form exists but is not keeping the application from completing its tasks
Syslog severity level = 4
 
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 parameterList)
          send an Alarm with the specified mnemonic and supplied parameter list
 void send(java.lang.String mnemonic, java.lang.String parameterName, java.lang.String parameterValue)
          send an Alarm with the specified mnemonic and with one parameter
 

Field Detail

NO_SEVERITY

static final int NO_SEVERITY
Applications can set this level to generate Alarms without a severity. NOTE: This is only intended for cases where an application wants the AlarmService to use the severity associated with the Alarm in the catalog

See Also:
Constant Field Values

DEBUGGING

static final int DEBUGGING
Very detailed information regarding errors or processing status that is only generated when DEBUG mode has been enabled
Syslog severity level = 7

See Also:
Constant Field Values

INFORMATIONAL

static final int INFORMATIONAL
Information of some form not relating to errors, warnings, audit, or debug
Syslog severity level =6

See Also:
Constant Field Values

NOTIFICATION

static final int NOTIFICATION
Notification denotes a normal but significant condition
Syslog severity level = 5

See Also:
Constant Field Values

WARNING

static final int WARNING
Warning that a problem of some form exists but is not keeping the application from completing its tasks
Syslog severity level = 4

See Also:
Constant Field Values

ERROR

static final int ERROR
An error condition of some kind has occurred and the user needs to understand the nature of that failure
Syslog severity level = 3

See Also:
Constant Field Values

CRITICAL

static final int CRITICAL
A critical failure, the application can not accomplish the tasks required due to this failure, eg: the app can't open the database to read the device list
Syslog severity level = 2

See Also:
Constant Field Values

ALERTS

static final int ALERTS
The application will continue working on the tasks but all functions may not be operational (one or more devices in the list are not accessible but others in the list can be accessed)
Syslog severity level = 1

See Also:
Constant Field Values

EMERGENCIES

static final int EMERGENCIES
Emergency situation, a system shutdown is necessary
Syslog severity level = 0

See Also:
Constant Field Values

LOWEST_LEVEL

static final int LOWEST_LEVEL
The lowest trace level, currently this is EMERGENCIES with a trace level of 0

See Also:
Constant Field Values

HIGHEST_LEVEL

static final int HIGHEST_LEVEL
The highest trace level, currently this is DEBUGGING with a trace level of 7

See Also:
Constant Field Values

UNKNOWN_MNEMONIC

static final java.lang.String UNKNOWN_MNEMONIC
String used when a mnemonic is not specifed during an Alarm send

See Also:
Constant Field Values
Method Detail

getFacility

java.lang.String getFacility()
Returns:
the facility name of this Alarm

getSubFacility

java.lang.String getSubFacility()
Returns:
the subfacility of this Alarm

getSeverity

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

send

void send(java.lang.String mnemonic)
send the Alarm with the specified mnemonic. If a null or empty String is passed a mnemonic UNK is sent


send

void send(java.lang.String mnemonic,
          java.lang.String parameterName,
          java.lang.String parameterValue)
send an Alarm with the specified mnemonic and with one parameter


send

void send(java.lang.String mnemonic,
          ParameterList parameterList)
send an Alarm with the specified mnemonic and supplied parameter list