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 ChangeMonitorAction changes the monitoring filename of a channel. It has
21 * no effect if the channel is not monitored.<br>
22 * It is implemented in <code>res/res_monitor.c</code>
23 *
24 * @author srt
25 * @version $Id: ChangeMonitorAction.java,v 1.5 2005/08/07 16:43:29 srt Exp $
26 */
27 public class ChangeMonitorAction extends AbstractManagerAction
28 {
29 /***
30 * Serializable version identifier
31 */
32 private static final long serialVersionUID = -798530703607827118L;
33 private String channel;
34 private String file;
35
36 /***
37 * Creates a new empty ChangeMonitorAction.
38 */
39 public ChangeMonitorAction()
40 {
41
42 }
43
44 /***
45 * Creates a new ChangeMonitorAction that causes monitoring data for the
46 * given channel to be written to the given file(s).
47 *
48 * @param channel the name of the channel that is monitored
49 * @param file the (base) name of the file(s) to which the voice data is
50 * written
51 * @since 0.2
52 */
53 public ChangeMonitorAction(String channel, String file)
54 {
55 this.channel = channel;
56 this.file = file;
57 }
58
59 /***
60 * Returns the name of this action, i.e. "ChangeMonitor".
61 */
62 public String getAction()
63 {
64 return "ChangeMonitor";
65 }
66
67 /***
68 * Returns the name of the monitored channel.
69 */
70 public String getChannel()
71 {
72 return channel;
73 }
74
75 /***
76 * Sets the name of the monitored channel.<br>
77 * This property is mandatory.
78 */
79 public void setChannel(String channel)
80 {
81 this.channel = channel;
82 }
83
84 /***
85 * Returns the name of the file to which the voice data is written.
86 */
87 public String getFile()
88 {
89 return file;
90 }
91
92 /***
93 * Sets the (base) name of the file(s) to which the voice data is written.<br>
94 * This property is mandatory.
95 */
96 public void setFile(String file)
97 {
98 this.file = file;
99 }
100 }