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 JoinEvent and LeaveEvent.
21   * 
22   * @author srt
23   * @version $Id: QueueEvent.java,v 1.2 2005/02/23 22:50:58 srt Exp $
24   */
25  public abstract class QueueEvent extends ManagerEvent
26  {
27      /***
28       * Serializable version identifier
29       */
30      static final long serialVersionUID = -8554382298783676181L;
31  
32      private String channel;
33      private String queue;
34      private Integer count;
35  
36      /***
37       * @param source
38       */
39      public QueueEvent(Object source)
40      {
41          super(source);
42      }
43  
44      /***
45       * Returns the name of the channel that joines or leaves a queue.
46       */
47      public String getChannel()
48      {
49          return channel;
50      }
51  
52      /***
53       * Sets the name of the channel that joines or leaves a queue.
54       */
55      public void setChannel(String channel)
56      {
57          this.channel = channel;
58      }
59  
60      /***
61       * Returns the number of elements in the queue, i.e. the number of calls waiting to be answered
62       * by an agent.
63       */
64      public Integer getCount()
65      {
66          return count;
67      }
68  
69      /***
70       * Sets the number of elements in the queue.
71       */
72      public void setCount(Integer count)
73      {
74          this.count = count;
75      }
76  
77      /***
78       * Returns the name of the queue.
79       */
80      public String getQueue()
81      {
82          return queue;
83      }
84  
85      /***
86       * Sets the name of the queue.
87       */
88      public void setQueue(String queue)
89      {
90          this.queue = queue;
91      }
92  }