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   * Abstract base class providing common properties for LinkEvent and
21   * UnlinkEvent.
22   * 
23   * @author srt
24   * @version $Id: LinkageEvent.java,v 1.3 2005/08/27 03:01:58 srt Exp $
25   */
26  public abstract class LinkageEvent extends ManagerEvent
27  {
28      /***
29       * Serializable version identifier
30       */
31      static final long serialVersionUID = 6563044930071030273L;
32  
33      private String uniqueId1;
34      private String uniqueId2;
35      private String channel1;
36      private String channel2;
37      private String callerId1;
38      private String callerId2;
39  
40      /***
41       * @param source
42       */
43      public LinkageEvent(Object source)
44      {
45          super(source);
46      }
47  
48      /***
49       * Returns the unique id of the first channel.
50       */
51      public String getUniqueId1()
52      {
53          return uniqueId1;
54      }
55  
56      /***
57       * Sets the unique id of the first channel.
58       */
59      public void setUniqueId1(String uniqueId1)
60      {
61          this.uniqueId1 = uniqueId1;
62      }
63  
64      /***
65       * Returns the unique id of the second channel.
66       */
67      public String getUniqueId2()
68      {
69          return uniqueId2;
70      }
71  
72      /***
73       * Sets the unique id of the second channel.
74       */
75      public void setUniqueId2(String uniqueId2)
76      {
77          this.uniqueId2 = uniqueId2;
78      }
79  
80      /***
81       * Returns the name of the first channel.
82       */
83      public String getChannel1()
84      {
85          return channel1;
86      }
87  
88      /***
89       * Sets the name of the first channel.
90       */
91      public void setChannel1(String channel1)
92      {
93          this.channel1 = channel1;
94      }
95  
96      /***
97       * Returns the name of the second channel.
98       */
99      public String getChannel2()
100     {
101         return channel2;
102     }
103 
104     /***
105      * Sets the name of the second channel.
106      */
107     public void setChannel2(String channel2)
108     {
109         this.channel2 = channel2;
110     }
111 
112     /***
113      * Returns the Caller*Id number of the first channel.
114      * 
115      * @return the Caller*Id number of the first channel.
116      * @since 0.2
117      */
118     public String getCallerId1()
119     {
120         return callerId1;
121     }
122 
123     /***
124      * Sets the Caller*Id number of the first channel.
125      * 
126      * @param callerId1 the Caller*Id number of the first channel.
127      * @since 0.2
128      */
129     public void setCallerId1(String callerId1)
130     {
131         this.callerId1 = callerId1;
132     }
133 
134     /***
135      * Returns the Caller*Id number of the second channel.
136      * 
137      * @return the Caller*Id number of the second channel.
138      * @since 0.2
139      */
140     public String getCallerId2()
141     {
142         return callerId2;
143     }
144 
145     /***
146      * Sets the Caller*Id number of the second channel.
147      * 
148      * @param callerId1 the Caller*Id number of the second channel.
149      * @since 0.2
150      */
151     public void setCallerId2(String callerId2)
152     {
153         this.callerId2 = callerId2;
154     }
155 }