1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.asteriskjava.manager.event;
18
19 /***
20 * A HangupEvent is triggered when a channel is hung up.<p>
21 * It is implemented in <code>channel.c</code>
22 *
23 * @author srt
24 * @version $Id: HangupEvent.java 476 2006-07-14 11:45:58Z srt $
25 */
26 public class HangupEvent extends AbstractChannelStateEvent
27 {
28 /***
29 * Serializable version identifier
30 */
31 static final long serialVersionUID = 650153034857116588L;
32
33 private Integer cause;
34 private String causeTxt;
35
36 /***
37 * @param source
38 */
39 public HangupEvent(Object source)
40 {
41 super(source);
42 }
43
44 /***
45 * Returns the cause of the hangup.
46 * @see org.asteriskjava.live.HangupCause
47 */
48 public Integer getCause()
49 {
50 return cause;
51 }
52
53 /***
54 * Sets the cause of the hangup.
55 */
56 public void setCause(Integer cause)
57 {
58 this.cause = cause;
59 }
60
61 /***
62 * Returns the textual representation of the hangup cause.
63 *
64 * @return the textual representation of the hangup cause.
65 * @since 0.2
66 */
67 public String getCauseTxt()
68 {
69 return causeTxt;
70 }
71
72 /***
73 * Sets the textual representation of the hangup cause.
74 *
75 * @param causeTxt the textual representation of the hangup cause.
76 * @since 0.2
77 */
78 public void setCauseTxt(String causeTxt)
79 {
80 this.causeTxt = causeTxt;
81 }
82 }