KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > fr > dyade > aaa > admin > script > StopScript


1 /*
2  * Copyright (C) 2001 - 2004 ScalAgent Distributed Technologies
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
17  * USA.
18  *
19  * Initial developer(s): ScalAgent Distributed Technologies
20  * Contributor(s):
21  */

22 package fr.dyade.aaa.admin.script;
23
24 import java.lang.*;
25 import java.io.*;
26 import java.util.*;
27 import fr.dyade.aaa.admin.cmd.*;
28 import fr.dyade.aaa.agent.conf.*;
29
30 /**
31  * StopScript contain a StopAdminCmd vector to stop networks, servers
32  * and services.
33  *
34  * @see fr.dyade.aaa.agent.AgentAdmin
35  * @see fr.dyade.aaa.agent.AgentServer
36  * @see StopAdminCmd
37  * @see A3CMLConfig
38  */

39 public class StopScript implements Serializable {
40   /** vector of StopAdminCmd */
41   private Vector commands = null;
42
43  /**
44   * StopScript
45   *
46   * @see AgentAdmin
47   */

48   public StopScript() {
49     commands = new Vector();
50   }
51
52   public void add(StopAdminCmd cmd) {
53     commands.addElement(cmd);
54   }
55
56   public boolean remove(StopAdminCmd cmd) {
57     return commands.removeElement(cmd);
58   }
59
60   public boolean contains(StopAdminCmd cmd) {
61     return commands.contains(cmd);
62   }
63
64   public Enumeration elements() {
65     return commands.elements();
66   }
67
68   public int size() {
69     return commands.size();
70   }
71
72   public Object JavaDoc elementAt(int i)
73     throws ArrayIndexOutOfBoundsException JavaDoc {
74     return commands.elementAt(i);
75   }
76
77   public String JavaDoc toString() {
78     return commands.toString();
79   }
80
81 }
82
Popular Tags