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.action;
18  
19  import net.sf.asterisk.manager.event.AgentsCompleteEvent;
20  
21  /***
22   * The AgentsAction requests the state of all agents.<br>
23   * For each agent an AgentsEvent is generated. After the state of all agents has been
24   * reported an AgentsCompleteEvent is generated.<br>
25   * Available since Asterisk 1.2
26   * 
27   * @see net.sf.asterisk.manager.event.AgentsEvent
28   * @see net.sf.asterisk.manager.event.AgentsCompleteEvent
29   * 
30   * @author srt
31   * @version $Id: AgentsAction.java,v 1.5 2005/08/07 00:09:42 srt Exp $
32   * @since 0.2
33   */
34  public class AgentsAction extends AbstractManagerAction implements EventGeneratingAction
35  {
36      /***
37       * Serializable version identifier
38       */
39      static final long serialVersionUID = -320228893513973367L;
40  
41      /***
42       * Creates a new AgentsAction.
43       */
44      public AgentsAction()
45      {
46          
47      }
48      
49      /***
50       * Returns the name of this action, i.e. "Agents".
51       */
52      public String getAction()
53      {
54          return "Agents";
55      }
56  
57      public Class getActionCompleteEventClass()
58      {
59          return AgentsCompleteEvent.class;
60      }
61  }