1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package net.sf.asterisk.manager.event;
18
19 /***
20 * An AlarmEvent is triggered when a Zap channel enters or changes alarm state.<br>
21 * It is implemented in <code>channels/chan_zap.c</code>
22 *
23 * @author srt
24 * @version $Id: AlarmEvent.java,v 1.2 2005/02/23 22:50:58 srt Exp $
25 */
26 public class AlarmEvent extends ManagerEvent
27 {
28 /***
29 * Serializable version identifier
30 */
31 private static final long serialVersionUID = 5235245336934457877L;
32 private String alarm;
33 private Integer channel;
34
35 /***
36 * @param source
37 */
38 public AlarmEvent(Object source)
39 {
40 super(source);
41 }
42
43 /***
44 * Returns the kind of alarm that happened.<br>
45 * This may be one of
46 * <ul>
47 * <li>Red Alarm</li>
48 * <li>Yellow Alarm</li>
49 * <li>Blue Alarm</li>
50 * <li>Recovering</li>
51 * <li>Loopback</li>
52 * <li>Not Open</li>
53 * </ul>
54 */
55 public String getAlarm()
56 {
57 return alarm;
58 }
59
60 /***
61 * Sets the kind of alarm that happened.
62 */
63 public void setAlarm(String alarm)
64 {
65 this.alarm = alarm;
66 }
67
68 /***
69 * Returns the number of the channel the alarm occured on.
70 */
71 public Integer getChannel()
72 {
73 return channel;
74 }
75
76 /***
77 * Sets the number of the channel the alarm occured on.
78 */
79 public void setChannel(Integer channel)
80 {
81 this.channel = channel;
82 }
83 }