|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.cisco.services.alarm.DefaultAlarmWriter
public class DefaultAlarmWriter
DefaultAlarmWriter
implementation of the AlarmWriter interface.
DefaultAlarmWriter
maintains a queue of a fixed size to which the alarms are
written. The sending of the alarms to the alarm service takes place on a seperate thread. The
queue is fixed size.
Constructor Summary | |
---|---|
DefaultAlarmWriter(int port,
java.lang.String alarmServiceName)
Constructor for the DefaultAlarmWriter which takes the AlarmService hostname, port and a queue size of fifty (50). |
|
DefaultAlarmWriter(int port,
java.lang.String alarmServiceName,
int queueSize)
Constructor for the DefaultAlarmWriter which takes the AlarmService hostname, port and queue size. |
|
DefaultAlarmWriter(int port,
java.lang.String alarmServiceName,
int queueSize,
ConditionalTrace debugTrace_,
UnconditionalTrace errorTrace_)
Constructor for the DefaultAlarmWriter which takes the AlarmService hostname, port and queue size. |
Method Summary | |
---|---|
void |
close()
Shutdown the send thread and close the socket |
java.lang.String |
getDescription()
|
boolean |
getEnabled()
|
java.lang.String |
getName()
|
static void |
main(java.lang.String[] args)
|
void |
send(java.lang.String alarmMessage)
send the Alarm to the alarm service |
void |
setEnabled(boolean enable)
Applications can dynamically enable or disable the AlarmWriter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultAlarmWriter(int port, java.lang.String alarmServiceName, int queueSize) throws java.net.UnknownHostException
port
- port on which the alarm service is listeningalarmServiceName
- The host name of the machine with the Alarm servicequeueSize
- the size of the queue to be maintained in the alarm writer
java.net.UnknownHostException
public DefaultAlarmWriter(int port, java.lang.String alarmServiceName) throws java.net.UnknownHostException
port
- port on which the alarm service is listeningalarmServiceName
- The host name of the machine with the Alarm service
java.net.UnknownHostException
public DefaultAlarmWriter(int port, java.lang.String alarmServiceName, int queueSize, ConditionalTrace debugTrace_, UnconditionalTrace errorTrace_) throws java.net.UnknownHostException
port
- port on which the alarm service is listeningalarmServiceName
- The host name of the machine with the Alarm servicequeueSize
- the size of the queue to be maintained in the alarm writer
java.net.UnknownHostException
Method Detail |
---|
public void send(java.lang.String alarmMessage)
send
in interface AlarmWriter
alarmMessage
- The Alarm to be sentpublic void close()
close
in interface AlarmWriter
public java.lang.String getName()
getName
in interface AlarmWriter
public java.lang.String getDescription()
getDescription
in interface AlarmWriter
public boolean getEnabled()
getEnabled
in interface AlarmWriter
public void setEnabled(boolean enable)
setEnabled
in interface AlarmWriter
enable
- Enable or disable the AlarmWriterpublic static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |