|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.cisco.services.alarm.AlarmManager
public class AlarmManager
The AlarmManager is used to create Alarm objects. The AlarmManager is created with a facility and
AlarmService hostname and port. All alarms created by the factory will be associated with this
facility. This class also maintains a reference to a single AlarmWriter that can be used system
wide. An application can make use of this AlarmWriter. AlarmManager exposes a default
implementation of an AlarmWriter. Applications can override this with a user defined
implementaion of their own AlarmWriter.
Usage: AlarmManager AlarmManager = new AlarmManager(facilityName, alarmServiceHost,
alarmServicePort, debugTrace, errorTrace);
Alarms are created by the factory by supplying the alarmName (mnemonic), subfacility and severity
Alarms can be cached for use in different parts of the application. During a send alarm
applications can specify the the variable parameters that offer specific information to the
AlarmService.
Usage:
Typically applications wil maintian their own AlarmManager intance. Applications will also have
to set a debug and error trace to enable the alarm tracing to also be sent to the existing trace
destinations.
Setup the manager and writer classes:
AlarmWriter alarmWriter = new DefaultAlarmWriter(port, alarmServiceHost);
AlarmManager alarmManager = new AlarmManager("AA_IVR", alarmWriter, debugTrace, errorTrace);
Generating the Alarms:
create an alarm for the subfacility and a default severity.
Alarm alarm = alarmManager.createAlarm("HTTPSS", Alarm.INFORMATIONAL);
alarm.send("090T") sends the alarm with the mnemonic
alarm.send("090T", "Port is stuck", "CTIPort01") or with a mnemonic and parameter
Note: More than one parameter can be sent by specifying a ParameterList
Constructor Summary | |
---|---|
AlarmManager(java.lang.String facility,
AlarmWriter writer,
Trace debugTrace_,
UnconditionalTrace errorTrace_)
Create an instance of the AlarmManager for the facility. |
Method Summary | |
---|---|
Alarm |
createAlarm(java.lang.String subfacility,
int severity)
Creates an Alarm of required severity for the subFacility |
AlarmWriter |
getAlarmWriter()
|
void |
setAlarmWriter(AlarmWriter writer)
Allows applications to override the AlarmWriter to be used by this AlarmManager, with a user defined AlarmWriter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AlarmManager(java.lang.String facility, AlarmWriter writer, Trace debugTrace_, UnconditionalTrace errorTrace_)
Method Detail |
---|
public Alarm createAlarm(java.lang.String subfacility, int severity)
public AlarmWriter getAlarmWriter()
public void setAlarmWriter(AlarmWriter writer)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |