KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > openccm > Deployment > ContainerLocalImpl


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

26
27 package org.objectweb.openccm.Deployment;
28
29
30 /**
31  * This class implements the OMG IDL
32  * ::Deployment::ContainerLocal interface.
33  *
34  * @author <a HREF="mailto:Romain.Rouvoy@lifl.fr">Romain Rouvoy</a>
35  *
36  * @version 0.3
37  */

38 public class ContainerLocalImpl
39 extends org.omg.CORBA.LocalObject JavaDoc
40 implements org.objectweb.openccm.Deployment.ContainerLocal
41 {
42     // ==================================================================
43
//
44
// Internal state.
45
//
46
// ==================================================================
47

48     /**
49      * reference to the container implementation
50      */

51     protected ContainerBase the_container_;
52
53     /**
54      * container reference
55      */

56     protected org.omg.Components.Deployment.Container the_container_ref;
57     
58     // ==================================================================
59
//
60
// Constructor.
61
//
62
// ==================================================================
63

64     /**
65      ** The constructor.
66      **
67      ** @param container reference to the container implementation.
68      **/

69     public
70     ContainerLocalImpl(ContainerBase container)
71     {
72         the_container_ = container;
73     }
74
75     // ==================================================================
76
//
77
// Internal methods.
78
//
79
// ==================================================================
80

81     // ==================================================================
82
//
83
// Public methods.
84
//
85
// ==================================================================
86

87     /**
88      ** Configure the listener for the current container
89      **
90      ** @param listener plugin to install on the container
91      **/

92     public void
93     add_listener (org.objectweb.openccm.Deployment.listener.ContainerListener listener)
94     {
95         the_container_.add_listener (listener);
96     }
97
98     /**
99      ** Add the home to thecontainer list of available homes
100      **
101      ** @param ref reference of the CCMHome to register
102      **/

103     public void
104     add_home(org.omg.Components.CCMHome ref)
105     {
106         the_container_.add_home (ref);
107     }
108     
109     // ==================================================================
110
//
111
// Methods for the Components::Deployment::Container interface.
112
//
113
// ==================================================================
114

115     //
116
// IDL:objectweb.org/ccm/plugins/deployment/api/ContainerLocal/remove_home:1.0
117
//
118
/**
119      ** remove the home from the container references.
120      **
121      ** @param ref CCMHome reference to unregistered
122      **/

123     public void
124     remove_home(org.omg.Components.CCMHome ref)
125     throws org.omg.Components.RemoveFailure
126     {
127         the_container_.remove_home (ref);
128     }
129
130     //
131
// IDL:objectweb.org/ccm/plugins/deployment/api/ContainerLocal/get_homes:1.0
132
//
133
/**
134      ** To obtain all created containers references.
135      **
136      ** @return list of available CCMhomes
137      **/

138     public org.omg.Components.CCMHome[]
139     get_homes()
140     {
141         return the_container_.get_homes ();
142     }
143
144     //
145
// IDL:objectweb.org/ccm/plugins/deployment/api/ContainerLocal/remove:1.0
146
//
147
/**
148      ** Destroy the current container
149      **
150      **/

151     public void
152     remove()
153     throws org.omg.Components.RemoveFailure
154     {
155         the_container_.remove ();
156     }
157 }
158
159
160
161
Popular Tags