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 AgentLoginEvent is triggered when an agent is successfully logged in using AgentLogin.<br>
21   * It is implemented in <code>channels/chan_agent.c</code>
22   * 
23   * @see net.sf.asterisk.manager.event.AgentLogoffEvent
24   * @author srt
25   * @version $Id: AgentLoginEvent.java,v 1.2 2005/02/23 22:50:58 srt Exp $
26   */
27  public class AgentLoginEvent extends ManagerEvent
28  {
29      /***
30       * Serializable version identifier
31       */
32      private static final long serialVersionUID = 7125917930904957919L;
33      private String agent;
34      private String loginChan;
35      private String uniqueId;
36  
37      /***
38       * @param source
39       */
40      public AgentLoginEvent(Object source)
41      {
42          super(source);
43      }
44  
45      /***
46       * Returns the name of the agent that logged in.
47       */
48      public String getAgent()
49      {
50          return agent;
51      }
52  
53      /***
54       * Sets the name of the agent that logged in.
55       */
56      public void setAgent(String agent)
57      {
58          this.agent = agent;
59      }
60  
61      public String getLoginChan()
62      {
63          return loginChan;
64      }
65  
66      public void setLoginChan(String loginChan)
67      {
68          this.loginChan = loginChan;
69      }
70  
71      public String getUniqueId()
72      {
73          return uniqueId;
74      }
75  
76      public void setUniqueId(String uniqueId)
77      {
78          this.uniqueId = uniqueId;
79      }
80  }