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   * An AgentConnectEvent is triggered when a caller is connected to an agent.<br>
21   * It is implemented in <code>apps/app_queue.c</code>.<br>
22   * Available since Asterisk 1.2
23   * 
24   * @author srt
25   * @version $Id: AgentConnectEvent.java,v 1.2 2005/08/28 09:45:19 srt Exp $
26   * @since 0.2
27   */
28  public class AgentConnectEvent extends AbstractAgentEvent
29  {
30      /***
31       * Serial version identifier.
32       */
33      private static final long serialVersionUID = 2108033737226142194L;
34  
35      private Long holdTime;
36  
37      public AgentConnectEvent(Object source)
38      {
39          super(source);
40      }
41  
42      /***
43       * Returns the amount of time the caller was on hold.
44       * 
45       * @return the amount of time the caller was on hold in seconds.
46       */
47      public Long getHoldTime()
48      {
49          return holdTime;
50      }
51  
52      /***
53       * Sets the amount of time the caller was on hold.
54       * 
55       * @param holdtime the amount of time the caller was on hold in seconds.
56       */
57      public void setHoldTime(Long holdtime)
58      {
59          this.holdTime = holdtime;
60      }
61  }