KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ist > coach > itut_q816Components > ContainmentServiceProviderComposition > ContainmentServiceProviderImpl


1 /*====================================================================
2
3 This file was produced by the OpenCCM CIF_JIMPL generator.
4
5 OpenCCM: The Open CORBA Component Model Platform
6 Copyright (C) 2000-2003 INRIA - USTL - LIFL - GOAL
7 Contact: openccm@objectweb.org
8
9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Lesser General Public
11 License as published by the Free Software Foundation; either
12 version 2.1 of the License, or any later version.
13
14 This library is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Lesser General Public License for more details.
18
19 You should have received a copy of the GNU Lesser General Public
20 License along with this library; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 USA
23
24 Initial developer(s): Christophe Demarey.
25 Contributor(s): ______________________________________.
26
27 ====================================================================*/

28
29 package ist.coach.itut_q816Components.ContainmentServiceProviderComposition;
30
31
32 /**
33  * This is the CIDL-based implementation of the
34  * OMG IDL3 IDL:coach.ist/itut_q816Components/ContainmentServiceProvider:1.0 component type.
35  *
36  * @author OpenCCM CIF_Jimpl Compiler.
37  */

38 public class ContainmentServiceProviderImpl
39      extends ist.coach.itut_q816Components.ContainmentServiceProviderComposition.ContainmentServiceProvider_impl
40 {
41     // ==================================================================
42
//
43
// Internal states.
44
//
45
// ==================================================================
46

47           /**** Business logic *****/
48
49         // hashtable that records for each object the existing children
50
// Key: the stringnified object Name
51
// Value: Vector with stringnified children Names
52
protected static java.util.Hashtable JavaDoc tree;
53
54         // hashtable that looks-up parents of objects
55
// needed during remove so that to index the tree table.
56
protected static java.util.Hashtable JavaDoc reverse_tree;
57
58     protected static String JavaDoc _local_root= null;
59     // ==================================================================
60
//
61
// Constructors.
62
//
63
// ==================================================================
64

65     public ContainmentServiceProviderImpl()
66     {
67         tree = new java.util.Hashtable JavaDoc();
68         reverse_tree = new java.util.Hashtable JavaDoc();
69     }
70     // ==================================================================
71
//
72
// Methods for the OMG IDL Components::EnterpriseComponent local interface.
73
//
74
// ==================================================================
75
//
76
// IDL:omg.org/Components/EnterpriseComponent/configuration_complete:1.0
77
//
78
/**
79      ** Completes the component configuration.
80      **
81      ** @throws org.omg.Components.InvalidConfiguration
82      ** Thrown if the configuration is invalid.
83      **/

84     public void
85     configuration_complete()
86     throws org.omg.Components.InvalidConfiguration
87     {
88         //
89
// DONE : implement !!!
90
//
91

92         System.err.println("Containment Local Root = " + _local_root);
93         if (_local_root != null && _local_root.length() > 0)
94           synchronized(_local_root) {
95             tree.put(_local_root, new java.util.Vector JavaDoc());
96           }
97         System.err.println("ContainmentServiceProvider configuration completed...");
98     }
99
100     // ==================================================================
101
//
102
// Methods.
103
//
104
// ==================================================================
105

106     /**
107      * Implementation of the ::itut_q816Components::CCM_ContainmentServiceProvider_Executor::local_root attribute as accessor operation.
108      */

109     public String JavaDoc
110     local_root()
111     {
112         //
113
// TODO : Implement
114
//
115
return _local_root;
116     }
117
118     /**
119      * Implementation of the ::itut_q816Components::CCM_ContainmentServiceProvider_Executor::local_root attribute as mutator operation.
120      */

121     public void
122     local_root(String JavaDoc local_root)
123     {
124                //
125
// DONE : implement
126
//
127
_local_root = local_root;
128         if (! tree.contains(_local_root))
129             tree.put(_local_root, new java.util.Vector JavaDoc());
130     }
131
132 }
133
Popular Tags