1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package net.sf.asterisk.manager.action;
18
19 /***
20 * The HangupAction causes the pbx to hang up a given channel.
21 *
22 * @author srt
23 * @version $Id: HangupAction.java,v 1.4 2005/11/08 10:14:09 srt Exp $
24 */
25 public class HangupAction extends AbstractManagerAction
26 {
27 /***
28 * Serializable version identifier
29 */
30 static final long serialVersionUID = 3479615884618713986L;
31
32 private String channel;
33
34 /***
35 * Creates a new empty HangupAction.
36 */
37 public HangupAction()
38 {
39
40 }
41
42 /***
43 * Creates a new HangupAction that hangs up the given channel.
44 *
45 * @param channel the name of the channel to hangup.
46 * @since 0.2
47 */
48 public HangupAction(String channel)
49 {
50 this.channel = channel;
51 }
52
53 /***
54 * Returns the name of this action, i.e. "Hangup".
55 */
56 public String getAction()
57 {
58 return "Hangup";
59 }
60
61 /***
62 * Returns the name of the channel to hangup.
63 *
64 * @return the name of the channel to hangup.
65 */
66 public String getChannel()
67 {
68 return channel;
69 }
70
71 /***
72 * Sets the name of the channel to hangup.
73 *
74 * @param channel the name of the channel to hangup.
75 */
76 public void setChannel(String channel)
77 {
78 this.channel = channel;
79 }
80 }