View Javadoc

1   /*
2    *  Copyright 2004-2006 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 org.asteriskjava.manager.event;
18  
19  /***
20   * Abstract base class for several queue member related events.
21   * 
22   * @author srt
23   * @version $Id: AbstractQueueMemberEvent.java 611 2007-02-16 12:41:14Z srt $
24   * @since 0.2
25   */
26  public abstract class AbstractQueueMemberEvent extends ManagerEvent
27  {
28      /***
29       * Serializable version identifier
30       */
31      private static final long serialVersionUID = -7437833328723536814L;
32      private String queue;
33      private String location;
34      private String memberName;
35  
36      /***
37       * @param source
38       */
39      protected AbstractQueueMemberEvent(Object source)
40      {
41          super(source);
42      }
43  
44      /***
45       * Returns the name of the queue.
46       * 
47       * @return the name of the queue.
48       */
49      public String getQueue()
50      {
51          return queue;
52      }
53  
54      /***
55       * Sets the name of the queue.
56       * 
57       * @param queue the name of the queue.
58       */
59      public void setQueue(String queue)
60      {
61          this.queue = queue;
62      }
63  
64      /***
65       * Returns the name of the member's interface.<p>
66       * E.g. the channel name or agent group.
67       * 
68       * @return the name of the member's interface.
69       */
70      public String getLocation()
71      {
72          return location;
73      }
74  
75      /***
76       * Sets the name of the member's interface.
77       * 
78       * @param member the name of the member's interface.
79       */
80      public void setLocation(String member)
81      {
82          this.location = member;
83      }
84  
85      /***
86       * Retruns the name of the queue member.
87       * <p>
88       * Available since Asterisk 1.4
89       * 
90       * @return the name of the queue member.
91       * @since 0.3
92       */
93      public String getMemberName()
94      {
95          return memberName;
96      }
97  
98      /***
99       * Sets the name of the queue member.
100      * <p>
101      * Available since Asterisk 1.4
102      * 
103      * @param memberName the name of the queue member.
104      * @since 0.3
105      */
106     public void setMemberName(String memberName)
107     {
108         this.memberName = memberName;
109     }
110 }