View Javadoc

1   /*
2    * Copyright  2004-2005 Stefan Reuter
3    *
4    *  Licensed under the Apache License, Version 2.0 (the "License");
5    *  you may not use this file except in compliance with the License.
6    *  You may obtain a copy of the License at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
10   *  Unless required by applicable law or agreed to in writing, software
11   *  distributed under the License is distributed on an "AS IS" BASIS,
12   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   *  See the License for the specific language governing permissions and
14   *  limitations under the License.
15   *
16   */
17  package net.sf.asterisk.manager.event;
18  
19  /***
20   * A NewExtenEvent is triggered when a channel is connected to a new extension.<br>
21   * It is implemented in <code>pbx.c</code>
22   * 
23   * @author srt
24   * @version $Id: NewExtenEvent.java,v 1.2 2005/02/23 22:50:58 srt Exp $
25   */
26  public class NewExtenEvent extends ManagerEvent
27  {
28      /***
29       * Serializable version identifier
30       */
31      static final long serialVersionUID = -467486409866099387L;
32  
33      private String uniqueId;
34      private String context;
35      private String extension;
36      private String application;
37      private String appData;
38      private Integer priority;
39      private String channel;
40  
41      /***
42       * @param source
43       */
44      public NewExtenEvent(Object source)
45      {
46          super(source);
47      }
48  
49      /***
50       * Returns the unique id of the channel.
51       */
52      public String getUniqueId()
53      {
54          return uniqueId;
55      }
56  
57      /***
58       * Sets the unique id of the channel.
59       */
60      public void setUniqueId(String uniqueId)
61      {
62          this.uniqueId = uniqueId;
63      }
64  
65      /***
66       * Returns the name of the application that is executed.
67       */
68      public String getApplication()
69      {
70          return application;
71      }
72  
73      /***
74       * Sets the name of the application that is executed.
75       */
76      public void setApplication(String application)
77      {
78          this.application = application;
79      }
80  
81      /***
82       * Returns the parameters passed to the application that is executed. The parameters are
83       * separated by a '|' character.
84       */
85      public String getAppData()
86      {
87          return appData;
88      }
89  
90      /***
91       * Sets the parameters passed to the application that is executed.
92       */
93      public void setAppData(String appData)
94      {
95          this.appData = appData;
96      }
97  
98      /***
99       * Returns the name of the channel.
100      */
101     public String getChannel()
102     {
103         return channel;
104     }
105 
106     /***
107      * Sets the name of the channel.
108      */
109     public void setChannel(String channel)
110     {
111         this.channel = channel;
112     }
113 
114     /***
115      * Returns the name of the context of the connected extension.
116      */
117     public String getContext()
118     {
119         return context;
120     }
121 
122     /***
123      * Sets the name of the context of the connected extension.
124      */
125     public void setContext(String context)
126     {
127         this.context = context;
128     }
129 
130     /***
131      * Returns the extension.
132      */
133     public String getExtension()
134     {
135         return extension;
136     }
137 
138     /***
139      * Sets the extension.
140      */
141     public void setExtension(String extension)
142     {
143         this.extension = extension;
144     }
145 
146     /***
147      * Returns the priority.
148      */
149     public Integer getPriority()
150     {
151         return priority;
152     }
153 
154     /***
155      * Sets the priority.
156      */
157     public void setPriority(Integer priority)
158     {
159         this.priority = priority;
160     }
161 }