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  /***
20   * The QueueRemoveAction removes a member from a queue.<br>
21   * It is implemented in <code>apps/app_queue.c</code>
22   * 
23   * @author srt
24   * @version $Id: QueueRemoveAction.java,v 1.5 2005/08/07 16:43:29 srt Exp $
25   */
26  public class QueueRemoveAction extends AbstractManagerAction
27  {
28      /***
29       * Serializable version identifier
30       */
31      private static final long serialVersionUID = -4296471882045706821L;
32  
33      /***
34       * The name of the queue the member will be removed from.
35       */
36      private String queue;
37      private String iface;
38  
39      /***
40       * Creates a new empty QueueRemoveAction.
41       */
42      public QueueRemoveAction()
43      {
44  
45      }
46  
47      /***
48       * Creates a new QueueRemoveAction that removes the member on the given
49       * interface from the given queue.
50       * 
51       * @param queue the name of the queue the member will be removed from
52       * @param iface the interface of the member to remove
53       * @since 0.2
54       */
55      public QueueRemoveAction(String queue, String iface)
56      {
57          this.queue = queue;
58          this.iface = iface;
59      }
60  
61      /***
62       * Returns the name of this action, i.e. "QueueRemove".
63       * 
64       * @return the name of this action.
65       */
66      public String getAction()
67      {
68          return "QueueRemove";
69      }
70  
71      /***
72       * Returns the name of the queue the member will be removed from.
73       * 
74       * @return the name of the queue the member will be removed from.
75       */
76      public String getQueue()
77      {
78          return queue;
79      }
80  
81      /***
82       * Sets the name of the queue the member will be removed from.<br>
83       * This property is mandatory.
84       * 
85       * @param queue the name of the queue the member will be removed from.
86       */
87      public void setQueue(String queue)
88      {
89          this.queue = queue;
90      }
91  
92      /***
93       * Returns the interface to remove.
94       */
95      public String getInterface()
96      {
97          return iface;
98      }
99  
100     /***
101      * Sets the interface to remove.<br>
102      * This property is mandatory.
103      */
104     public void setInterface(String iface)
105     {
106         this.iface = iface;
107     }
108 }