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 AgentCallbackLogoffEvent is triggered when an agent that previously logged in using
21   * AgentCallbackLogin is logged of.<br>
22   * It is implemented in <code>channels/chan_agent.c</code>
23   * 
24   * @see net.sf.asterisk.manager.event.AgentCallbackLoginEvent
25   * @author srt
26   * @version $Id: AgentCallbackLogoffEvent.java,v 1.2 2005/02/23 22:50:58 srt Exp $
27   */
28  public class AgentCallbackLogoffEvent extends ManagerEvent
29  {
30      /***
31       * Serializable version identifier
32       */
33      private static final long serialVersionUID = 8458799161502800576L;
34      private String agent;
35      private String loginChan;
36      private String loginTime;
37      private String reason;
38      private String uniqueId;
39  
40      /***
41       * @param source
42       */
43      public AgentCallbackLogoffEvent(Object source)
44      {
45          super(source);
46      }
47  
48      /***
49       * Returns the name of the agent that logged off.
50       */
51      public String getAgent()
52      {
53          return agent;
54      }
55  
56      /***
57       * Sets the name of the agent that logged off.
58       */
59      public void setAgent(String agent)
60      {
61          this.agent = agent;
62      }
63  
64      public String getLoginChan()
65      {
66          return loginChan;
67      }
68  
69      public void setLoginChan(String loginChan)
70      {
71          this.loginChan = loginChan;
72      }
73  
74      public String getLoginTime()
75      {
76          return loginTime;
77      }
78  
79      public void setLoginTime(String loginTime)
80      {
81          this.loginTime = loginTime;
82      }
83  
84      /***
85       * Returns the reason for the logoff. The reason is set to Autologoff if the agent has been
86       * logged off due to not answering the phone in time. Autologoff is configured by setting
87       * <code>autologoff</code> to the appropriate number of seconds in <code>agents.conf</code>.
88       */
89      public String getReason()
90      {
91          return reason;
92      }
93  
94      /***
95       * Sets the reason for the logoff.
96       */
97      public void setReason(String reason)
98      {
99          this.reason = reason;
100     }
101 
102     public String getUniqueId()
103     {
104         return uniqueId;
105     }
106 
107     public void setUniqueId(String uniqueId)
108     {
109         this.uniqueId = uniqueId;
110     }
111 }