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 java.io.Serializable;
20  
21  /***
22   * Interface that all Actions that can be sent to the Asterisk server must
23   * impement.<br>
24   * Instances of this class represent a command sent to Asterisk via Manager API,
25   * requesting a particular Action be performed. The number of actions available
26   * to the client are determined by the modules presently loaded in the Asterisk
27   * engine.<br>
28   * There is one conrete subclass of ManagerAction per each supported Asterisk
29   * Action.
30   * 
31   * @author srt
32   * @version $Id: ManagerAction.java,v 1.4 2005/07/16 13:19:33 srt Exp $
33   */
34  public interface ManagerAction extends Serializable
35  {
36      /***
37       * Returns the name of the action.
38       */
39      String getAction();
40  
41      /***
42       * Returns the action id.
43       */
44      String getActionId();
45  
46      /***
47       * Sets the action id.<br>
48       * If the action id is set and sent to the asterisk server any response
49       * returned by the asterisk server will include the same action id. This way
50       * the action id can be used to track actions and their corresponding
51       * responses.
52       */
53      void setActionId(String actionId);
54  
55  }