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 * Abstract base class for events triggered in response to a ManagerAction.<p>
21 * All ResponseEvents contain an additional action id property that links the
22 * event to the action that caused it.
23 *
24 * @see org.asteriskjava.manager.action.ManagerAction
25 * @author srt
26 * @version $Id: ResponseEvent.java 397 2006-05-26 12:13:32Z srt $
27 */
28 public abstract class ResponseEvent extends ManagerEvent
29 {
30 private String actionId;
31 private String internalActionId;
32
33 /***
34 * @param source
35 */
36 public ResponseEvent(Object source)
37 {
38 super(source);
39 }
40
41 /***
42 * Returns the user provided action id of the ManagerAction that caused
43 * this event. If the application did not set an action id this method
44 * returns <code>null</code>.
45 *
46 * @return the action id of the ManagerAction that caused this event or
47 * <code>null</code> if none was set.
48 * @see org.asteriskjava.manager.action.ManagerAction#setActionId()
49 */
50 public String getActionId()
51 {
52 return actionId;
53 }
54
55 /***
56 * Sets the action id of the ManagerAction that caused this event.
57 *
58 * @param actionId the action id of the ManagerAction that caused this
59 * event.
60 */
61 public void setActionId(String actionId)
62 {
63 this.actionId = actionId;
64 }
65
66 /***
67 * Returns the internal action id of the ManagerAction that caused this
68 * event.<p>
69 * Warning: This method is internal to Asterisk-Java and should never be
70 * used in application code.
71 *
72 * @return the internal action id of the ManagerAction that caused this
73 * event.
74 * @since 0.2
75 */
76 public String getInternalActionId()
77 {
78 return internalActionId;
79 }
80
81 /***
82 * Sets the internal action id of the ManagerAction that caused this event.
83 *
84 * @param internalActionId the internal action id of the ManagerAction that
85 * caused this event.
86 * @since 0.2
87 */
88 public void setInternalActionId(String internalActionId)
89 {
90 this.internalActionId = internalActionId;
91 }
92 }