KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > iiop > rmi > ir > ContainerImpl


1 /*
2 * JBoss, Home of Professional Open Source
3 * Copyright 2005, JBoss Inc., and individual contributors as indicated
4 * by the @authors tag. See the copyright.txt in the distribution for a
5 * full listing of individual contributors.
6 *
7 * This is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License as
9 * published by the Free Software Foundation; either version 2.1 of
10 * the License, or (at your option) any later version.
11 *
12 * This software 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 software; if not, write to the Free
19 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21 */

22 package org.jboss.iiop.rmi.ir;
23
24 import org.omg.CORBA.ContainerOperations JavaDoc;
25 import org.omg.CORBA.Contained JavaDoc;
26 import org.omg.CORBA.ContainerPackage.Description;
27 import org.omg.CORBA.IDLType JavaDoc;
28 import org.omg.CORBA.DefinitionKind JavaDoc;
29 import org.omg.CORBA.StructMember JavaDoc;
30 import org.omg.CORBA.UnionMember JavaDoc;
31 import org.omg.CORBA.InterfaceDef JavaDoc;
32 import org.omg.CORBA.ConstantDef JavaDoc;
33 import org.omg.CORBA.EnumDef JavaDoc;
34 import org.omg.CORBA.ValueDef JavaDoc;
35 import org.omg.CORBA.ValueBoxDef JavaDoc;
36 import org.omg.CORBA.Initializer JavaDoc;
37 import org.omg.CORBA.StructDef JavaDoc;
38 import org.omg.CORBA.UnionDef JavaDoc;
39 import org.omg.CORBA.ModuleDef JavaDoc;
40 import org.omg.CORBA.NativeDef JavaDoc;
41 import org.omg.CORBA.AliasDef JavaDoc;
42 import org.omg.CORBA.Any JavaDoc;
43 import org.omg.CORBA.ExceptionDef JavaDoc;
44
45 /**
46  * Abstract base class for container IR entities.
47  *
48  * @author <a HREF="mailto:osh@sparre.dk">Ole Husgaard</a>
49  * @version $Revision: 37459 $
50  */

51 abstract class ContainerImpl
52    extends IRObjectImpl
53    implements ContainerOperations JavaDoc, LocalContainer
54 {
55    // Constants -----------------------------------------------------
56

57    // Attributes ----------------------------------------------------
58

59    // Static --------------------------------------------------------
60

61    // Constructors --------------------------------------------------
62

63    ContainerImpl(DefinitionKind JavaDoc def_kind, RepositoryImpl repository)
64    {
65       super(def_kind, repository);
66
67       this.delegate = new ContainerImplDelegate(this);
68    }
69
70    // Public --------------------------------------------------------
71

72    // LocalContainer implementation ---------------------------------
73

74    public LocalContained _lookup(String JavaDoc search_name)
75    {
76       return delegate._lookup(search_name);
77    }
78  
79    public LocalContained[] _contents(DefinitionKind JavaDoc limit_type,
80                                      boolean exclude_inherited)
81    {
82       return delegate._contents(limit_type, exclude_inherited);
83    }
84
85    public LocalContained[] _lookup_name(String JavaDoc search_name,
86                                         int levels_to_search,
87                                         DefinitionKind JavaDoc limit_type,
88                                         boolean exclude_inherited)
89    {
90       return delegate._lookup_name(search_name, levels_to_search, limit_type,
91                                    exclude_inherited);
92    }
93
94    public void add(String JavaDoc name, LocalContained contained)
95       throws IRConstructionException
96    {
97       delegate.add(name, contained);
98    }
99
100    public void allDone()
101       throws IRConstructionException
102    {
103       getReference();
104       delegate.allDone();
105    }
106
107    public void shutdown()
108    {
109       delegate.shutdown();
110       super.shutdown();
111    }
112
113    // ContainerOperations implementation ----------------------------
114

115    public Contained JavaDoc lookup(String JavaDoc search_name)
116    {
117       return delegate.lookup(search_name);
118    }
119
120    public Contained JavaDoc[] contents(DefinitionKind JavaDoc limit_type,
121                                boolean exclude_inherited)
122    {
123       return delegate.contents(limit_type, exclude_inherited);
124    }
125
126    public Contained JavaDoc[] lookup_name(String JavaDoc search_name, int levels_to_search,
127                                   DefinitionKind JavaDoc limit_type,
128                                   boolean exclude_inherited)
129    {
130       return delegate.lookup_name(search_name, levels_to_search, limit_type,
131                                   exclude_inherited);
132    }
133
134    public Description[] describe_contents(DefinitionKind JavaDoc limit_type,
135                                           boolean exclude_inherited,
136                                           int max_returned_objs)
137    {
138       return delegate.describe_contents(limit_type, exclude_inherited,
139                                         max_returned_objs);
140    }
141
142    public ModuleDef JavaDoc create_module(String JavaDoc id, String JavaDoc name, String JavaDoc version)
143    {
144       return delegate.create_module(id, name, version);
145    }
146
147    public ConstantDef JavaDoc create_constant(String JavaDoc id, String JavaDoc name, String JavaDoc version,
148                                       IDLType JavaDoc type, Any JavaDoc value)
149    {
150       return delegate.create_constant(id, name, version, type, value);
151    }
152
153    public StructDef JavaDoc create_struct(String JavaDoc id, String JavaDoc name, String JavaDoc version,
154                                   StructMember JavaDoc[] members)
155    {
156       return delegate.create_struct(id, name, version, members);
157    }
158
159    public UnionDef JavaDoc create_union(String JavaDoc id, String JavaDoc name, String JavaDoc version,
160                                 IDLType JavaDoc discriminator_type,
161                                 UnionMember JavaDoc[] members)
162    {
163       return delegate.create_union(id, name, version, discriminator_type,
164                                    members);
165    }
166
167    public EnumDef JavaDoc create_enum(String JavaDoc id, String JavaDoc name, String JavaDoc version,
168                               String JavaDoc[] members)
169    {
170       return delegate.create_enum(id, name, version, members);
171    }
172
173    public AliasDef JavaDoc create_alias(String JavaDoc id, String JavaDoc name, String JavaDoc version,
174                                 IDLType JavaDoc original_type)
175    {
176       return delegate.create_alias(id, name, version, original_type);
177    }
178
179    public InterfaceDef JavaDoc create_interface(String JavaDoc id, String JavaDoc name, String JavaDoc version,
180                                         InterfaceDef JavaDoc[] base_interfaces,
181                                         boolean is_abstract)
182    {
183       return delegate.create_interface(id, name, version,
184                                        base_interfaces, is_abstract);
185    }
186
187    public ValueDef JavaDoc create_value(String JavaDoc id, String JavaDoc name, String JavaDoc version,
188                                 boolean is_custom, boolean is_abstract,
189                                 ValueDef JavaDoc base_value, boolean is_truncatable,
190                                 ValueDef JavaDoc[] abstract_base_values,
191                                 InterfaceDef JavaDoc[] supported_interfaces,
192                                 Initializer JavaDoc[] initializers)
193    {
194       return delegate.create_value(id, name, version, is_custom, is_abstract,
195                                    base_value, is_truncatable,
196                                    abstract_base_values, supported_interfaces,
197                                    initializers);
198    }
199
200    public ValueBoxDef JavaDoc create_value_box(String JavaDoc id, String JavaDoc name, String JavaDoc version,
201                                        IDLType JavaDoc original_type_def)
202    {
203       return delegate.create_value_box(id, name, version, original_type_def);
204    }
205
206    public ExceptionDef JavaDoc create_exception(String JavaDoc id, String JavaDoc name, String JavaDoc version,
207                                         StructMember JavaDoc[] members)
208    {
209       return delegate.create_exception(id, name, version, members);
210    }
211
212    public NativeDef JavaDoc create_native(String JavaDoc id, String JavaDoc name, String JavaDoc version)
213    {
214       return delegate.create_native(id, name, version);
215    }
216
217
218    // Y overrides ---------------------------------------------------
219

220    // Package protected ---------------------------------------------
221

222    // Protected -----------------------------------------------------
223

224    // Private -------------------------------------------------------
225

226    /**
227     * My delegate for Container functionality.
228     */

229    ContainerImplDelegate delegate;
230
231    // Inner classes -------------------------------------------------
232
}
233
234
Popular Tags