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 * With the EventsAction you can specify what kind of events should be sent to
21 * this manager connection.
22 *
23 * @author srt
24 * @version $Id: EventsAction.java,v 1.4 2005/08/07 00:09:42 srt Exp $
25 */
26 public class EventsAction extends AbstractManagerAction
27 {
28 /***
29 * Serializable version identifier
30 */
31 static final long serialVersionUID = -8042435402644984875L;
32
33 private String eventMask;
34
35 /***
36 * Creates a new empty EventsAction.
37 */
38 public EventsAction()
39 {
40
41 }
42
43 /***
44 * Creates a new EventsAction that applies the given event mask to the
45 * current manager connection.
46 *
47 * @param eventMask the event mask. Set to "on" if all events should be
48 * send, "off" if not events should be sent or a combination of
49 * "system", "call" and "log" (separated by ',') to specify what
50 * kind of events should be sent.
51 * @since 0.2
52 */
53 public EventsAction(String eventMask)
54 {
55 this.eventMask = eventMask;
56 }
57
58 /***
59 * Returns the name of this action, i.e. "Events".
60 */
61 public String getAction()
62 {
63 return "Events";
64 }
65
66 /***
67 * Returns the event mask.
68 */
69 public String getEventMask()
70 {
71 return eventMask;
72 }
73
74 /***
75 * Sets the event mask.<br>
76 * Set to "on" if all events should be send, "off" if not events should be
77 * sent or a combination of "system", "call" and "log" (separated by ',') to
78 * specify what kind of events should be sent.
79 */
80 public void setEventMask(String eventMask)
81 {
82 this.eventMask = eventMask;
83 }
84 }