KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > openccm > Deployment > listener > simple > ComponentServerListenerSimple


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.listener.simple;
28
29
30 /**
31  * Simple implementation for the
32  * ::plugins::deployment::ComponentServerListener interface.
33  *
34  * @author <a HREF="mailto:Romain.Rouvoy@lifl.fr">Romain Rouvoy</a>
35  *
36  * @version 0.3
37  */

38 public class ComponentServerListenerSimple
39 extends org.objectweb.openccm.Deployment.listener.ComponentServerListenerBase
40 {
41     // ==================================================================
42
//
43
// Internal state.
44
//
45
// ==================================================================
46

47     // ==================================================================
48
//
49
// Constructor.
50
//
51
// ==================================================================
52
/**
53      * Constructor with parameter
54      *
55      * @param source the event source
56      */

57     public
58     ComponentServerListenerSimple()
59     {
60         super();
61     }
62
63     // ==================================================================
64
//
65
// Internal methods.
66
//
67
// ==================================================================
68
/**
69      * Provide a new instance of the class
70      *
71      * @return new instance
72      */

73     protected org.objectweb.openccm.Deployment.listener.ComponentServerListener
74     _new()
75     {
76                 return new ComponentServerListenerSimple();
77     }
78     
79     // ==================================================================
80
//
81
// Public methods.
82
//
83
// ==================================================================
84

85     // ==================================================================
86
//
87
// Methods for the ::Deployment::listener::ComponentServerListener interface.
88
//
89
// ==================================================================
90
//
91
// IDL:omg.org/Deployment/listener/ComponentServerListener/get_sub_listener:1.0
92
//
93
/**
94      * Provide the equivalent Container listener for the current listener
95      *
96      * @return the equivalent Container listener
97      */

98     public org.objectweb.openccm.Deployment.listener.ContainerListener
99         get_sub_listener()
100     {
101                 return new ContainerListenerSimple();
102     }
103
104     // ==================================================================
105
//
106
// Methods for the ::Deployment::listener::ComponentServerEvents interface.
107
//
108
// ==================================================================
109
//
110
// IDL:omg.org/Deployment/listener/ComponentServerEvents/on_create:1.0
111
//
112
/**
113      * Event sent after the create function is called on ComponentServer object
114      *
115      * @param ref the object created
116      */

117     public void
118     on_create (org.omg.Components.Deployment.Container cont_ref)
119     {
120         delegate_.on_create (cont_ref);
121         source_.add_container (cont_ref);
122     }
123     
124     //
125
// IDL:omg.org/Deployment/listener/ComponentServerEvents/on_add:1.0
126
//
127
/**
128      * Event sent after the add function is called on ComponentServer object
129      *
130      * @param ref the object added
131      */

132     public void
133     on_add (org.omg.Components.Deployment.Container cont_ref)
134     {
135         delegate_.on_add (cont_ref);
136     }
137     
138     //
139
// IDL:omg.org/Deployment/listener/ComponentServerEvents/on_remove:1.0
140
//
141
/**
142      * Event sent before the remove function is called on ComponentServer object
143      *
144      * @param ref the object removed
145      */

146     public void
147     on_remove (org.omg.Components.Deployment.Container cont_ref)
148     {
149         delegate_.on_remove (cont_ref);
150     }
151     
152     //
153
// IDL:omg.org/Deployment/listener/ComponentServerEvents/on_destroy:1.0
154
//
155
/**
156      * Event sent before the destruction of the related ComponentServer object
157      *
158      */

159     public void
160     on_destroy ()
161     {
162         delegate_.on_destroy ();
163     }
164 }
165
Popular Tags