KickJava   Java API By Example, From Geeks To Geeks.

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


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 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::ComponentServerLocal interface.
33  *
34  * @author <a HREF="mailto:Romain.Rouvoy@lifl.fr">Romain Rouvoy</a>
35  *
36  * @version 0.3
37  */

38 public class ComponentServerLocalImpl
39     extends org.omg.CORBA.LocalObject JavaDoc
40     implements org.objectweb.openccm.Deployment.ComponentServerLocal
41 {
42     // ==================================================================
43
//
44
// Internal state.
45
//
46
// ==================================================================
47
/**
48      * Reference to the component server implementation
49      */

50     protected ComponentServerBase the_component_server_ ;
51     
52     // ==================================================================
53
//
54
// Constructor.
55
//
56
// ==================================================================
57
/**
58      ** The constructor.
59      **
60      ** @param component_server reference to the component server implementation.
61      **/

62     public
63     ComponentServerLocalImpl(ComponentServerBase component_server)
64     {
65         the_component_server_ = component_server;
66     }
67
68     // ==================================================================
69
//
70
// Internal methods.
71
//
72
// ==================================================================
73

74     // ==================================================================
75
//
76
// Public methods.
77
//
78
// ==================================================================
79

80     /**
81      ** Configure the listener for the current component server
82      **
83      ** @param listener plugin to install on the component server
84      **/

85     public void
86     add_listener (org.objectweb.openccm.Deployment.listener.ComponentServerListener listener)
87     {
88         the_component_server_.add_listener (listener);
89     }
90     
91
92     /**
93      ** Add the container to the component server list of available containers
94      **
95      ** @param ref reference of the container to register
96      **/

97     public void
98     add_container (org.omg.Components.Deployment.Container ref)
99     {
100         the_component_server_.add_container (ref);
101     }
102     
103     
104     // ==================================================================
105
//
106
// Methods for the ::plugins::deployment::api::ComponentServerLocal interface.
107
//
108
// ==================================================================
109

110     //
111
// IDL:objectweb.org/ccm/plugins/deployment/api/ComponentServerLocal/remove_container:1.0
112
//
113
/**
114      ** To remove a container from the component server references.
115      **
116      ** @param ref Container reference to unregistered
117      **/

118     public void
119     remove_container(org.omg.Components.Deployment.Container ref)
120     throws org.omg.Components.RemoveFailure
121     {
122         the_component_server_.remove_container (ref);
123     }
124
125     //
126
// IDL:objectweb.org/ccm/plugins/deployment/api/ComponentServerLocal/get_containers:1.0
127
//
128
/**
129      ** To obtain all created containers references.
130      **
131      **/

132     public org.omg.Components.Deployment.Container[]
133     get_containers()
134     {
135         return the_component_server_.get_containers ();
136     }
137
138     //
139
// IDL:objectweb.org/ccm/plugins/deployment/api/ComponentServerLocal/remove:1.0
140
//
141
/**
142      ** To remove this component server.
143      **
144      **/

145     public void
146     remove()
147     throws org.omg.Components.RemoveFailure
148     {
149         the_component_server_.remove ();
150     }
151 }
152
Popular Tags