KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > proactive > core > component > ControllerDescription


1 /*
2  * ################################################################
3  *
4  * ProActive: The Java(TM) library for Parallel, Distributed,
5  * Concurrent computing with Security and Mobility
6  *
7  * Copyright (C) 1997-2004 INRIA/University of Nice-Sophia Antipolis
8  * Contact: proactive-support@inria.fr
9  *
10  * This library is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public
12  * License as published by the Free Software Foundation; either
13  * version 2.1 of the License, or any later version.
14  *
15  * This library is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  * Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public
21  * License along with this library; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
23  * USA
24  *
25  * Initial developer(s): The ProActive Team
26  * http://www.inria.fr/oasis/ProActive/contacts.html
27  * Contributor(s):
28  *
29  * ################################################################
30  */

31 package org.objectweb.proactive.core.component;
32
33 import java.io.Serializable JavaDoc;
34
35
36 /**
37  * Fractal implementation-specific description of the controllers of components.
38  * It is currently used to specify the hierarchical type and the name of the components.
39  * @author Matthieu Morel
40  */

41 public class ControllerDescription implements Serializable JavaDoc {
42
43     private String JavaDoc hierarchicalType;
44     private String JavaDoc name;
45
46     /**
47      * a no-arg constructor (used in the ProActive parser)
48      *
49      */

50     public ControllerDescription() {
51         hierarchicalType = null;
52         name = null;
53     }
54     
55     /**
56      * constructor
57      * @param name the name of the component
58      * @param hierarchicalType the hierachical type of the component. See {@link Constants}
59      */

60     public ControllerDescription(String JavaDoc name, String JavaDoc hierarchicalType) {
61         this.hierarchicalType = hierarchicalType;
62         this.name = name;
63     }
64     
65     /**
66      * copy constructor (clones the object)
67      * @param controllerDesc the ControllerDescription to copy.
68      */

69     public ControllerDescription(ControllerDescription controllerDesc) {
70         hierarchicalType = new String JavaDoc(controllerDesc.getHierarchicalType());
71         name = new String JavaDoc(controllerDesc.getName());
72     }
73     
74     /**
75      * Returns the hierarchicalType.
76      * @return String
77      */

78     public String JavaDoc getHierarchicalType() {
79         return hierarchicalType;
80     }
81
82     
83     /**
84      * setter for hierarchical type
85      * @param string hierarchical type. See {@link Constants}
86      */

87     public void setHierarchicalType(String JavaDoc string) {
88         hierarchicalType = string;
89     }
90     
91     /**
92      * getter for the name
93      * @return the name of the component
94      */

95     public String JavaDoc getName() {
96         return name;
97     }
98     
99     /**
100      * setter for the name
101      * @param name name of the component
102      */

103     public void setName(String JavaDoc name) {
104         this.name = name;
105     }
106     
107
108
109 }
110
Popular Tags