Sat, 07 Nov 2020 10:30:02 +0800
Added tag mips-jdk8u275-b01 for changeset 146eabb0a016
aoqi@0 | 1 | /* |
aoqi@0 | 2 | * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved. |
aoqi@0 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
aoqi@0 | 4 | * |
aoqi@0 | 5 | * This code is free software; you can redistribute it and/or modify it |
aoqi@0 | 6 | * under the terms of the GNU General Public License version 2 only, as |
aoqi@0 | 7 | * published by the Free Software Foundation. Oracle designates this |
aoqi@0 | 8 | * particular file as subject to the "Classpath" exception as provided |
aoqi@0 | 9 | * by Oracle in the LICENSE file that accompanied this code. |
aoqi@0 | 10 | * |
aoqi@0 | 11 | * This code is distributed in the hope that it will be useful, but WITHOUT |
aoqi@0 | 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
aoqi@0 | 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
aoqi@0 | 14 | * version 2 for more details (a copy is included in the LICENSE file that |
aoqi@0 | 15 | * accompanied this code). |
aoqi@0 | 16 | * |
aoqi@0 | 17 | * You should have received a copy of the GNU General Public License version |
aoqi@0 | 18 | * 2 along with this work; if not, write to the Free Software Foundation, |
aoqi@0 | 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
aoqi@0 | 20 | * |
aoqi@0 | 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
aoqi@0 | 22 | * or visit www.oracle.com if you need additional information or have any |
aoqi@0 | 23 | * questions. |
aoqi@0 | 24 | */ |
aoqi@0 | 25 | |
aoqi@0 | 26 | package org.omg.CORBA; |
aoqi@0 | 27 | |
aoqi@0 | 28 | import org.omg.CORBA.portable.*; |
aoqi@0 | 29 | import org.omg.CORBA.ORBPackage.InvalidName; |
aoqi@0 | 30 | |
aoqi@0 | 31 | import java.util.Properties; |
aoqi@0 | 32 | import java.applet.Applet; |
aoqi@0 | 33 | import java.io.File; |
aoqi@0 | 34 | import java.io.FileInputStream; |
aoqi@0 | 35 | |
aoqi@0 | 36 | import java.security.AccessController; |
aoqi@0 | 37 | import java.security.PrivilegedAction; |
aoqi@0 | 38 | |
aoqi@0 | 39 | import sun.reflect.misc.ReflectUtil; |
aoqi@0 | 40 | |
aoqi@0 | 41 | /** |
aoqi@0 | 42 | * A class providing APIs for the CORBA Object Request Broker |
aoqi@0 | 43 | * features. The <code>ORB</code> class also provides |
aoqi@0 | 44 | * "pluggable ORB implementation" APIs that allow another vendor's ORB |
aoqi@0 | 45 | * implementation to be used. |
aoqi@0 | 46 | * <P> |
aoqi@0 | 47 | * An ORB makes it possible for CORBA objects to communicate |
aoqi@0 | 48 | * with each other by connecting objects making requests (clients) with |
aoqi@0 | 49 | * objects servicing requests (servers). |
aoqi@0 | 50 | * <P> |
aoqi@0 | 51 | * |
aoqi@0 | 52 | * The <code>ORB</code> class, which |
aoqi@0 | 53 | * encapsulates generic CORBA functionality, does the following: |
aoqi@0 | 54 | * (Note that items 5 and 6, which include most of the methods in |
aoqi@0 | 55 | * the class <code>ORB</code>, are typically used with the <code>Dynamic Invocation |
aoqi@0 | 56 | * Interface</code> (DII) and the <code>Dynamic Skeleton Interface</code> |
aoqi@0 | 57 | * (DSI). |
aoqi@0 | 58 | * These interfaces may be used by a developer directly, but |
aoqi@0 | 59 | * most commonly they are used by the ORB internally and are |
aoqi@0 | 60 | * not seen by the general programmer.) |
aoqi@0 | 61 | * <OL> |
aoqi@0 | 62 | * <li> initializes the ORB implementation by supplying values for |
aoqi@0 | 63 | * predefined properties and environmental parameters |
aoqi@0 | 64 | * <li> obtains initial object references to services such as |
aoqi@0 | 65 | * the NameService using the method <code>resolve_initial_references</code> |
aoqi@0 | 66 | * <li> converts object references to strings and back |
aoqi@0 | 67 | * <li> connects the ORB to a servant (an instance of a CORBA object |
aoqi@0 | 68 | * implementation) and disconnects the ORB from a servant |
aoqi@0 | 69 | * <li> creates objects such as |
aoqi@0 | 70 | * <ul> |
aoqi@0 | 71 | * <li><code>TypeCode</code> |
aoqi@0 | 72 | * <li><code>Any</code> |
aoqi@0 | 73 | * <li><code>NamedValue</code> |
aoqi@0 | 74 | * <li><code>Context</code> |
aoqi@0 | 75 | * <li><code>Environment</code> |
aoqi@0 | 76 | * <li>lists (such as <code>NVList</code>) containing these objects |
aoqi@0 | 77 | * </ul> |
aoqi@0 | 78 | * <li> sends multiple messages in the DII |
aoqi@0 | 79 | * </OL> |
aoqi@0 | 80 | * |
aoqi@0 | 81 | * <P> |
aoqi@0 | 82 | * The <code>ORB</code> class can be used to obtain references to objects |
aoqi@0 | 83 | * implemented anywhere on the network. |
aoqi@0 | 84 | * <P> |
aoqi@0 | 85 | * An application or applet gains access to the CORBA environment |
aoqi@0 | 86 | * by initializing itself into an <code>ORB</code> using one of |
aoqi@0 | 87 | * three <code>init</code> methods. Two of the three methods use the properties |
aoqi@0 | 88 | * (associations of a name with a value) shown in the |
aoqi@0 | 89 | * table below.<BR> |
aoqi@0 | 90 | * <TABLE BORDER=1 SUMMARY="Standard Java CORBA Properties"> |
aoqi@0 | 91 | * <TR><TH>Property Name</TH> <TH>Property Value</TH></TR> |
aoqi@0 | 92 | * <CAPTION>Standard Java CORBA Properties:</CAPTION> |
aoqi@0 | 93 | * <TR><TD>org.omg.CORBA.ORBClass</TD> |
aoqi@0 | 94 | * <TD>class name of an ORB implementation</TD></TR> |
aoqi@0 | 95 | * <TR><TD>org.omg.CORBA.ORBSingletonClass</TD> |
aoqi@0 | 96 | * <TD>class name of the ORB returned by <code>init()</code></TD></TR> |
aoqi@0 | 97 | * </TABLE> |
aoqi@0 | 98 | * <P> |
aoqi@0 | 99 | * These properties allow a different vendor's <code>ORB</code> |
aoqi@0 | 100 | * implementation to be "plugged in." |
aoqi@0 | 101 | * <P> |
aoqi@0 | 102 | * When an ORB instance is being created, the class name of the ORB |
aoqi@0 | 103 | * implementation is located using |
aoqi@0 | 104 | * the following standard search order:<P> |
aoqi@0 | 105 | * |
aoqi@0 | 106 | * <OL> |
aoqi@0 | 107 | * <LI>check in Applet parameter or application string array, if any |
aoqi@0 | 108 | * |
aoqi@0 | 109 | * <LI>check in properties parameter, if any |
aoqi@0 | 110 | * |
aoqi@0 | 111 | * <LI>check in the System properties |
aoqi@0 | 112 | * |
aoqi@0 | 113 | * <LI>check in the orb.properties file located in the user.home |
aoqi@0 | 114 | * directory (if any) |
aoqi@0 | 115 | * |
aoqi@0 | 116 | * <LI>check in the orb.properties file located in the java.home/lib |
aoqi@0 | 117 | * directory (if any) |
aoqi@0 | 118 | * |
aoqi@0 | 119 | * <LI>fall back on a hardcoded default behavior (use the Java IDL |
aoqi@0 | 120 | * implementation) |
aoqi@0 | 121 | * </OL> |
aoqi@0 | 122 | * <P> |
aoqi@0 | 123 | * Note that Java IDL provides a default implementation for the |
aoqi@0 | 124 | * fully-functional ORB and for the Singleton ORB. When the method |
aoqi@0 | 125 | * <code>init</code> is given no parameters, the default Singleton |
aoqi@0 | 126 | * ORB is returned. When the method <code>init</code> is given parameters |
aoqi@0 | 127 | * but no ORB class is specified, the Java IDL ORB implementation |
aoqi@0 | 128 | * is returned. |
aoqi@0 | 129 | * <P> |
aoqi@0 | 130 | * The following code fragment creates an <code>ORB</code> object |
aoqi@0 | 131 | * initialized with the default ORB Singleton. |
aoqi@0 | 132 | * This ORB has a |
aoqi@0 | 133 | * restricted implementation to prevent malicious applets from doing |
aoqi@0 | 134 | * anything beyond creating typecodes. |
aoqi@0 | 135 | * It is called a singleton |
aoqi@0 | 136 | * because there is only one instance for an entire virtual machine. |
aoqi@0 | 137 | * <PRE> |
aoqi@0 | 138 | * ORB orb = ORB.init(); |
aoqi@0 | 139 | * </PRE> |
aoqi@0 | 140 | * <P> |
aoqi@0 | 141 | * The following code fragment creates an <code>ORB</code> object |
aoqi@0 | 142 | * for an application. The parameter <code>args</code> |
aoqi@0 | 143 | * represents the arguments supplied to the application's <code>main</code> |
aoqi@0 | 144 | * method. Since the property specifies the ORB class to be |
aoqi@0 | 145 | * "SomeORBImplementation", the new ORB will be initialized with |
aoqi@0 | 146 | * that ORB implementation. If p had been null, |
aoqi@0 | 147 | * and the arguments had not specified an ORB class, |
aoqi@0 | 148 | * the new ORB would have been |
aoqi@0 | 149 | * initialized with the default Java IDL implementation. |
aoqi@0 | 150 | * <PRE> |
aoqi@0 | 151 | * Properties p = new Properties(); |
aoqi@0 | 152 | * p.put("org.omg.CORBA.ORBClass", "SomeORBImplementation"); |
aoqi@0 | 153 | * ORB orb = ORB.init(args, p); |
aoqi@0 | 154 | * </PRE> |
aoqi@0 | 155 | * <P> |
aoqi@0 | 156 | * The following code fragment creates an <code>ORB</code> object |
aoqi@0 | 157 | * for the applet supplied as the first parameter. If the given |
aoqi@0 | 158 | * applet does not specify an ORB class, the new ORB will be |
aoqi@0 | 159 | * initialized with the default Java IDL implementation. |
aoqi@0 | 160 | * <PRE> |
aoqi@0 | 161 | * ORB orb = ORB.init(myApplet, null); |
aoqi@0 | 162 | * </PRE> |
aoqi@0 | 163 | * <P> |
aoqi@0 | 164 | * An application or applet can be initialized in one or more ORBs. |
aoqi@0 | 165 | * ORB initialization is a bootstrap call into the CORBA world. |
aoqi@0 | 166 | * @since JDK1.2 |
aoqi@0 | 167 | */ |
aoqi@0 | 168 | abstract public class ORB { |
aoqi@0 | 169 | |
aoqi@0 | 170 | // |
aoqi@0 | 171 | // This is the ORB implementation used when nothing else is specified. |
aoqi@0 | 172 | // Whoever provides this class customizes this string to |
aoqi@0 | 173 | // point at their ORB implementation. |
aoqi@0 | 174 | // |
aoqi@0 | 175 | private static final String ORBClassKey = "org.omg.CORBA.ORBClass"; |
aoqi@0 | 176 | private static final String ORBSingletonClassKey = "org.omg.CORBA.ORBSingletonClass"; |
aoqi@0 | 177 | |
aoqi@0 | 178 | // |
aoqi@0 | 179 | // The global instance of the singleton ORB implementation which |
aoqi@0 | 180 | // acts as a factory for typecodes for generated Helper classes. |
aoqi@0 | 181 | // TypeCodes should be immutable since they may be shared across |
aoqi@0 | 182 | // different security contexts (applets). There should be no way to |
aoqi@0 | 183 | // use a TypeCode as a storage depot for illicitly passing |
aoqi@0 | 184 | // information or Java objects between different security contexts. |
aoqi@0 | 185 | // |
aoqi@0 | 186 | static private ORB singleton; |
aoqi@0 | 187 | |
aoqi@0 | 188 | // Get System property |
aoqi@0 | 189 | private static String getSystemProperty(final String name) { |
aoqi@0 | 190 | |
aoqi@0 | 191 | // This will not throw a SecurityException because this |
aoqi@0 | 192 | // class was loaded from rt.jar using the bootstrap classloader. |
aoqi@0 | 193 | String propValue = (String) AccessController.doPrivileged( |
aoqi@0 | 194 | new PrivilegedAction() { |
aoqi@0 | 195 | public java.lang.Object run() { |
aoqi@0 | 196 | return System.getProperty(name); |
aoqi@0 | 197 | } |
aoqi@0 | 198 | } |
aoqi@0 | 199 | ); |
aoqi@0 | 200 | |
aoqi@0 | 201 | return propValue; |
aoqi@0 | 202 | } |
aoqi@0 | 203 | |
aoqi@0 | 204 | // Get property from orb.properties in either <user.home> or <java-home>/lib |
aoqi@0 | 205 | // directories. |
aoqi@0 | 206 | private static String getPropertyFromFile(final String name) { |
aoqi@0 | 207 | // This will not throw a SecurityException because this |
aoqi@0 | 208 | // class was loaded from rt.jar using the bootstrap classloader. |
aoqi@0 | 209 | |
aoqi@0 | 210 | String propValue = (String) AccessController.doPrivileged( |
aoqi@0 | 211 | new PrivilegedAction() { |
aoqi@0 | 212 | private Properties getFileProperties( String fileName ) { |
aoqi@0 | 213 | try { |
aoqi@0 | 214 | File propFile = new File( fileName ) ; |
aoqi@0 | 215 | if (!propFile.exists()) |
aoqi@0 | 216 | return null ; |
aoqi@0 | 217 | |
aoqi@0 | 218 | Properties props = new Properties() ; |
aoqi@0 | 219 | FileInputStream fis = new FileInputStream(propFile); |
aoqi@0 | 220 | try { |
aoqi@0 | 221 | props.load( fis ); |
aoqi@0 | 222 | } finally { |
aoqi@0 | 223 | fis.close() ; |
aoqi@0 | 224 | } |
aoqi@0 | 225 | |
aoqi@0 | 226 | return props ; |
aoqi@0 | 227 | } catch (Exception exc) { |
aoqi@0 | 228 | return null ; |
aoqi@0 | 229 | } |
aoqi@0 | 230 | } |
aoqi@0 | 231 | |
aoqi@0 | 232 | public java.lang.Object run() { |
aoqi@0 | 233 | String userHome = System.getProperty("user.home"); |
aoqi@0 | 234 | String fileName = userHome + File.separator + |
aoqi@0 | 235 | "orb.properties" ; |
aoqi@0 | 236 | Properties props = getFileProperties( fileName ) ; |
aoqi@0 | 237 | |
aoqi@0 | 238 | if (props != null) { |
aoqi@0 | 239 | String value = props.getProperty( name ) ; |
aoqi@0 | 240 | if (value != null) |
aoqi@0 | 241 | return value ; |
aoqi@0 | 242 | } |
aoqi@0 | 243 | |
aoqi@0 | 244 | String javaHome = System.getProperty("java.home"); |
aoqi@0 | 245 | fileName = javaHome + File.separator |
aoqi@0 | 246 | + "lib" + File.separator + "orb.properties"; |
aoqi@0 | 247 | props = getFileProperties( fileName ) ; |
aoqi@0 | 248 | |
aoqi@0 | 249 | if (props == null) |
aoqi@0 | 250 | return null ; |
aoqi@0 | 251 | else |
aoqi@0 | 252 | return props.getProperty( name ) ; |
aoqi@0 | 253 | } |
aoqi@0 | 254 | } |
aoqi@0 | 255 | ); |
aoqi@0 | 256 | |
aoqi@0 | 257 | return propValue; |
aoqi@0 | 258 | } |
aoqi@0 | 259 | |
aoqi@0 | 260 | /** |
aoqi@0 | 261 | * Returns the <code>ORB</code> singleton object. This method always returns the |
aoqi@0 | 262 | * same ORB instance, which is an instance of the class described by the |
aoqi@0 | 263 | * <code>org.omg.CORBA.ORBSingletonClass</code> system property. |
aoqi@0 | 264 | * <P> |
aoqi@0 | 265 | * This no-argument version of the method <code>init</code> is used primarily |
aoqi@0 | 266 | * as a factory for <code>TypeCode</code> objects, which are used by |
aoqi@0 | 267 | * <code>Helper</code> classes to implement the method <code>type</code>. |
aoqi@0 | 268 | * It is also used to create <code>Any</code> objects that are used to |
aoqi@0 | 269 | * describe <code>union</code> labels (as part of creating a <code> |
aoqi@0 | 270 | * TypeCode</code> object for a <code>union</code>). |
aoqi@0 | 271 | * <P> |
aoqi@0 | 272 | * This method is not intended to be used by applets, and in the event |
aoqi@0 | 273 | * that it is called in an applet environment, the ORB it returns |
aoqi@0 | 274 | * is restricted so that it can be used only as a factory for |
aoqi@0 | 275 | * <code>TypeCode</code> objects. Any <code>TypeCode</code> objects |
aoqi@0 | 276 | * it produces can be safely shared among untrusted applets. |
aoqi@0 | 277 | * <P> |
aoqi@0 | 278 | * If an ORB is created using this method from an applet, |
aoqi@0 | 279 | * a system exception will be thrown if |
aoqi@0 | 280 | * methods other than those for |
aoqi@0 | 281 | * creating <code>TypeCode</code> objects are invoked. |
aoqi@0 | 282 | * |
aoqi@0 | 283 | * @return the singleton ORB |
aoqi@0 | 284 | */ |
aoqi@0 | 285 | public static synchronized ORB init() { |
aoqi@0 | 286 | if (singleton == null) { |
aoqi@0 | 287 | String className = getSystemProperty(ORBSingletonClassKey); |
aoqi@0 | 288 | if (className == null) |
aoqi@0 | 289 | className = getPropertyFromFile(ORBSingletonClassKey); |
aoqi@0 | 290 | if ((className == null) || |
aoqi@0 | 291 | (className.equals("com.sun.corba.se.impl.orb.ORBSingleton"))) { |
aoqi@0 | 292 | singleton = new com.sun.corba.se.impl.orb.ORBSingleton(); |
aoqi@0 | 293 | } else { |
aoqi@0 | 294 | singleton = create_impl(className); |
aoqi@0 | 295 | } |
aoqi@0 | 296 | } |
aoqi@0 | 297 | return singleton; |
aoqi@0 | 298 | } |
aoqi@0 | 299 | |
aoqi@0 | 300 | private static ORB create_impl(String className) { |
aoqi@0 | 301 | ClassLoader cl = Thread.currentThread().getContextClassLoader(); |
aoqi@0 | 302 | if (cl == null) |
aoqi@0 | 303 | cl = ClassLoader.getSystemClassLoader(); |
aoqi@0 | 304 | |
aoqi@0 | 305 | try { |
aoqi@0 | 306 | ReflectUtil.checkPackageAccess(className); |
aoqi@0 | 307 | Class<org.omg.CORBA.ORB> orbBaseClass = org.omg.CORBA.ORB.class; |
aoqi@0 | 308 | Class<?> orbClass = Class.forName(className, true, cl).asSubclass(orbBaseClass); |
aoqi@0 | 309 | return (ORB)orbClass.newInstance(); |
aoqi@0 | 310 | } catch (Throwable ex) { |
aoqi@0 | 311 | SystemException systemException = new INITIALIZE( |
aoqi@0 | 312 | "can't instantiate default ORB implementation " + className); |
aoqi@0 | 313 | systemException.initCause(ex); |
aoqi@0 | 314 | throw systemException; |
aoqi@0 | 315 | } |
aoqi@0 | 316 | } |
aoqi@0 | 317 | |
aoqi@0 | 318 | /** |
aoqi@0 | 319 | * Creates a new <code>ORB</code> instance for a standalone |
aoqi@0 | 320 | * application. This method may be called from applications |
aoqi@0 | 321 | * only and returns a new fully functional <code>ORB</code> object |
aoqi@0 | 322 | * each time it is called. |
aoqi@0 | 323 | * @param args command-line arguments for the application's <code>main</code> |
aoqi@0 | 324 | * method; may be <code>null</code> |
aoqi@0 | 325 | * @param props application-specific properties; may be <code>null</code> |
aoqi@0 | 326 | * @return the newly-created ORB instance |
aoqi@0 | 327 | */ |
aoqi@0 | 328 | public static ORB init(String[] args, Properties props) { |
aoqi@0 | 329 | // |
aoqi@0 | 330 | // Note that there is no standard command-line argument for |
aoqi@0 | 331 | // specifying the default ORB implementation. For an |
aoqi@0 | 332 | // application you can choose an implementation either by |
aoqi@0 | 333 | // setting the CLASSPATH to pick a different org.omg.CORBA |
aoqi@0 | 334 | // and it's baked-in ORB implementation default or by |
aoqi@0 | 335 | // setting an entry in the properties object or in the |
aoqi@0 | 336 | // system properties. |
aoqi@0 | 337 | // |
aoqi@0 | 338 | String className = null; |
aoqi@0 | 339 | ORB orb; |
aoqi@0 | 340 | |
aoqi@0 | 341 | if (props != null) |
aoqi@0 | 342 | className = props.getProperty(ORBClassKey); |
aoqi@0 | 343 | if (className == null) |
aoqi@0 | 344 | className = getSystemProperty(ORBClassKey); |
aoqi@0 | 345 | if (className == null) |
aoqi@0 | 346 | className = getPropertyFromFile(ORBClassKey); |
aoqi@0 | 347 | if ((className == null) || |
aoqi@0 | 348 | (className.equals("com.sun.corba.se.impl.orb.ORBImpl"))) { |
aoqi@0 | 349 | orb = new com.sun.corba.se.impl.orb.ORBImpl(); |
aoqi@0 | 350 | } else { |
aoqi@0 | 351 | orb = create_impl(className); |
aoqi@0 | 352 | } |
aoqi@0 | 353 | orb.set_parameters(args, props); |
aoqi@0 | 354 | return orb; |
aoqi@0 | 355 | } |
aoqi@0 | 356 | |
aoqi@0 | 357 | |
aoqi@0 | 358 | /** |
aoqi@0 | 359 | * Creates a new <code>ORB</code> instance for an applet. This |
aoqi@0 | 360 | * method may be called from applets only and returns a new |
aoqi@0 | 361 | * fully-functional <code>ORB</code> object each time it is called. |
aoqi@0 | 362 | * @param app the applet; may be <code>null</code> |
aoqi@0 | 363 | * @param props applet-specific properties; may be <code>null</code> |
aoqi@0 | 364 | * @return the newly-created ORB instance |
aoqi@0 | 365 | */ |
aoqi@0 | 366 | public static ORB init(Applet app, Properties props) { |
aoqi@0 | 367 | String className; |
aoqi@0 | 368 | ORB orb; |
aoqi@0 | 369 | |
aoqi@0 | 370 | className = app.getParameter(ORBClassKey); |
aoqi@0 | 371 | if (className == null && props != null) |
aoqi@0 | 372 | className = props.getProperty(ORBClassKey); |
aoqi@0 | 373 | if (className == null) |
aoqi@0 | 374 | className = getSystemProperty(ORBClassKey); |
aoqi@0 | 375 | if (className == null) |
aoqi@0 | 376 | className = getPropertyFromFile(ORBClassKey); |
aoqi@0 | 377 | if ((className == null) || |
aoqi@0 | 378 | (className.equals("com.sun.corba.se.impl.orb.ORBImpl"))) { |
aoqi@0 | 379 | orb = new com.sun.corba.se.impl.orb.ORBImpl(); |
aoqi@0 | 380 | } else { |
aoqi@0 | 381 | orb = create_impl(className); |
aoqi@0 | 382 | } |
aoqi@0 | 383 | orb.set_parameters(app, props); |
aoqi@0 | 384 | return orb; |
aoqi@0 | 385 | } |
aoqi@0 | 386 | |
aoqi@0 | 387 | /** |
aoqi@0 | 388 | * Allows the ORB implementation to be initialized with the given |
aoqi@0 | 389 | * parameters and properties. This method, used in applications only, |
aoqi@0 | 390 | * is implemented by subclass ORB implementations and called |
aoqi@0 | 391 | * by the appropriate <code>init</code> method to pass in its parameters. |
aoqi@0 | 392 | * |
aoqi@0 | 393 | * @param args command-line arguments for the application's <code>main</code> |
aoqi@0 | 394 | * method; may be <code>null</code> |
aoqi@0 | 395 | * @param props application-specific properties; may be <code>null</code> |
aoqi@0 | 396 | */ |
aoqi@0 | 397 | abstract protected void set_parameters(String[] args, Properties props); |
aoqi@0 | 398 | |
aoqi@0 | 399 | /** |
aoqi@0 | 400 | * Allows the ORB implementation to be initialized with the given |
aoqi@0 | 401 | * applet and parameters. This method, used in applets only, |
aoqi@0 | 402 | * is implemented by subclass ORB implementations and called |
aoqi@0 | 403 | * by the appropriate <code>init</code> method to pass in its parameters. |
aoqi@0 | 404 | * |
aoqi@0 | 405 | * @param app the applet; may be <code>null</code> |
aoqi@0 | 406 | * @param props applet-specific properties; may be <code>null</code> |
aoqi@0 | 407 | */ |
aoqi@0 | 408 | abstract protected void set_parameters(Applet app, Properties props); |
aoqi@0 | 409 | |
aoqi@0 | 410 | /** |
aoqi@0 | 411 | * Connects the given servant object (a Java object that is |
aoqi@0 | 412 | * an instance of the server implementation class) |
aoqi@0 | 413 | * to the ORB. The servant class must |
aoqi@0 | 414 | * extend the <code>ImplBase</code> class corresponding to the interface that is |
aoqi@0 | 415 | * supported by the server. The servant must thus be a CORBA object |
aoqi@0 | 416 | * reference, and inherit from <code>org.omg.CORBA.Object</code>. |
aoqi@0 | 417 | * Servants created by the user can start receiving remote invocations |
aoqi@0 | 418 | * after the method <code>connect</code> has been called. A servant may also be |
aoqi@0 | 419 | * automatically and implicitly connected to the ORB if it is passed as |
aoqi@0 | 420 | * an IDL parameter in an IDL method invocation on a non-local object, |
aoqi@0 | 421 | * that is, if the servant object has to be marshalled and sent outside of the |
aoqi@0 | 422 | * process address space. |
aoqi@0 | 423 | * <P> |
aoqi@0 | 424 | * Calling the method <code>connect</code> has no effect |
aoqi@0 | 425 | * when the servant object is already connected to the ORB. |
aoqi@0 | 426 | * <P> |
aoqi@0 | 427 | * Deprecated by the OMG in favor of the Portable Object Adapter APIs. |
aoqi@0 | 428 | * |
aoqi@0 | 429 | * @param obj The servant object reference |
aoqi@0 | 430 | */ |
aoqi@0 | 431 | public void connect(org.omg.CORBA.Object obj) { |
aoqi@0 | 432 | throw new NO_IMPLEMENT(); |
aoqi@0 | 433 | } |
aoqi@0 | 434 | |
aoqi@0 | 435 | /** |
aoqi@0 | 436 | * Destroys the ORB so that its resources can be reclaimed. |
aoqi@0 | 437 | * Any operation invoked on a destroyed ORB reference will throw the |
aoqi@0 | 438 | * <code>OBJECT_NOT_EXIST</code> exception. |
aoqi@0 | 439 | * Once an ORB has been destroyed, another call to <code>init</code> |
aoqi@0 | 440 | * with the same ORBid will return a reference to a newly constructed ORB.<p> |
aoqi@0 | 441 | * If <code>destroy</code> is called on an ORB that has not been shut down, |
aoqi@0 | 442 | * it will start the shut down process and block until the ORB has shut down |
aoqi@0 | 443 | * before it destroys the ORB.<br> |
aoqi@0 | 444 | * If an application calls <code>destroy</code> in a thread that is currently servicing |
aoqi@0 | 445 | * an invocation, the <code>BAD_INV_ORDER</code> system exception will be thrown |
aoqi@0 | 446 | * with the OMG minor code 3, since blocking would result in a deadlock.<p> |
aoqi@0 | 447 | * For maximum portability and to avoid resource leaks, an application should |
aoqi@0 | 448 | * always call <code>shutdown</code> and <code>destroy</code> |
aoqi@0 | 449 | * on all ORB instances before exiting. |
aoqi@0 | 450 | * |
aoqi@0 | 451 | * @throws org.omg.CORBA.BAD_INV_ORDER if the current thread is servicing an invocation |
aoqi@0 | 452 | */ |
aoqi@0 | 453 | public void destroy( ) { |
aoqi@0 | 454 | throw new NO_IMPLEMENT(); |
aoqi@0 | 455 | } |
aoqi@0 | 456 | |
aoqi@0 | 457 | /** |
aoqi@0 | 458 | * Disconnects the given servant object from the ORB. After this method returns, |
aoqi@0 | 459 | * the ORB will reject incoming remote requests for the disconnected |
aoqi@0 | 460 | * servant and will send the exception |
aoqi@0 | 461 | * <code>org.omg.CORBA.OBJECT_NOT_EXIST</code> back to the |
aoqi@0 | 462 | * remote client. Thus the object appears to be destroyed from the |
aoqi@0 | 463 | * point of view of remote clients. Note, however, that local requests issued |
aoqi@0 | 464 | * using the servant directly do not |
aoqi@0 | 465 | * pass through the ORB; hence, they will continue to be processed by the |
aoqi@0 | 466 | * servant. |
aoqi@0 | 467 | * <P> |
aoqi@0 | 468 | * Calling the method <code>disconnect</code> has no effect |
aoqi@0 | 469 | * if the servant is not connected to the ORB. |
aoqi@0 | 470 | * <P> |
aoqi@0 | 471 | * Deprecated by the OMG in favor of the Portable Object Adapter APIs. |
aoqi@0 | 472 | * |
aoqi@0 | 473 | * @param obj The servant object to be disconnected from the ORB |
aoqi@0 | 474 | */ |
aoqi@0 | 475 | public void disconnect(org.omg.CORBA.Object obj) { |
aoqi@0 | 476 | throw new NO_IMPLEMENT(); |
aoqi@0 | 477 | } |
aoqi@0 | 478 | |
aoqi@0 | 479 | // |
aoqi@0 | 480 | // ORB method implementations. |
aoqi@0 | 481 | // |
aoqi@0 | 482 | // We are trying to accomplish 2 things at once in this class. |
aoqi@0 | 483 | // It can act as a default ORB implementation front-end, |
aoqi@0 | 484 | // creating an actual ORB implementation object which is a |
aoqi@0 | 485 | // subclass of this ORB class and then delegating the method |
aoqi@0 | 486 | // implementations. |
aoqi@0 | 487 | // |
aoqi@0 | 488 | // To accomplish the delegation model, the 'delegate' private instance |
aoqi@0 | 489 | // variable is set if an instance of this class is created directly. |
aoqi@0 | 490 | // |
aoqi@0 | 491 | |
aoqi@0 | 492 | /** |
aoqi@0 | 493 | * Returns a list of the initially available CORBA object references, |
aoqi@0 | 494 | * such as "NameService" and "InterfaceRepository". |
aoqi@0 | 495 | * |
aoqi@0 | 496 | * @return an array of <code>String</code> objects that represent |
aoqi@0 | 497 | * the object references for CORBA services |
aoqi@0 | 498 | * that are initially available with this ORB |
aoqi@0 | 499 | */ |
aoqi@0 | 500 | abstract public String[] list_initial_services(); |
aoqi@0 | 501 | |
aoqi@0 | 502 | /** |
aoqi@0 | 503 | * Resolves a specific object reference from the set of available |
aoqi@0 | 504 | * initial service names. |
aoqi@0 | 505 | * |
aoqi@0 | 506 | * @param object_name the name of the initial service as a string |
aoqi@0 | 507 | * @return the object reference associated with the given name |
aoqi@0 | 508 | * @exception InvalidName if the given name is not associated with a |
aoqi@0 | 509 | * known service |
aoqi@0 | 510 | */ |
aoqi@0 | 511 | abstract public org.omg.CORBA.Object resolve_initial_references(String object_name) |
aoqi@0 | 512 | throws InvalidName; |
aoqi@0 | 513 | |
aoqi@0 | 514 | /** |
aoqi@0 | 515 | * Converts the given CORBA object reference to a string. |
aoqi@0 | 516 | * Note that the format of this string is predefined by IIOP, allowing |
aoqi@0 | 517 | * strings generated by a different ORB to be converted back into an object |
aoqi@0 | 518 | * reference. |
aoqi@0 | 519 | * <P> |
aoqi@0 | 520 | * The resulting <code>String</code> object may be stored or communicated |
aoqi@0 | 521 | * in any way that a <code>String</code> object can be manipulated. |
aoqi@0 | 522 | * |
aoqi@0 | 523 | * @param obj the object reference to stringify |
aoqi@0 | 524 | * @return the string representing the object reference |
aoqi@0 | 525 | */ |
aoqi@0 | 526 | abstract public String object_to_string(org.omg.CORBA.Object obj); |
aoqi@0 | 527 | |
aoqi@0 | 528 | /** |
aoqi@0 | 529 | * Converts a string produced by the method <code>object_to_string</code> |
aoqi@0 | 530 | * back to a CORBA object reference. |
aoqi@0 | 531 | * |
aoqi@0 | 532 | * @param str the string to be converted back to an object reference. It must |
aoqi@0 | 533 | * be the result of converting an object reference to a string using the |
aoqi@0 | 534 | * method <code>object_to_string</code>. |
aoqi@0 | 535 | * @return the object reference |
aoqi@0 | 536 | */ |
aoqi@0 | 537 | abstract public org.omg.CORBA.Object string_to_object(String str); |
aoqi@0 | 538 | |
aoqi@0 | 539 | /** |
aoqi@0 | 540 | * Allocates an <code>NVList</code> with (probably) enough |
aoqi@0 | 541 | * space for the specified number of <code>NamedValue</code> objects. |
aoqi@0 | 542 | * Note that the specified size is only a hint to help with |
aoqi@0 | 543 | * storage allocation and does not imply the maximum size of the list. |
aoqi@0 | 544 | * |
aoqi@0 | 545 | * @param count suggested number of <code>NamedValue</code> objects for |
aoqi@0 | 546 | * which to allocate space |
aoqi@0 | 547 | * @return the newly-created <code>NVList</code> |
aoqi@0 | 548 | * |
aoqi@0 | 549 | * @see NVList |
aoqi@0 | 550 | */ |
aoqi@0 | 551 | abstract public NVList create_list(int count); |
aoqi@0 | 552 | |
aoqi@0 | 553 | /** |
aoqi@0 | 554 | * Creates an <code>NVList</code> initialized with argument |
aoqi@0 | 555 | * descriptions for the operation described in the given |
aoqi@0 | 556 | * <code>OperationDef</code> object. This <code>OperationDef</code> object |
aoqi@0 | 557 | * is obtained from an Interface Repository. The arguments in the |
aoqi@0 | 558 | * returned <code>NVList</code> object are in the same order as in the |
aoqi@0 | 559 | * original IDL operation definition, which makes it possible for the list |
aoqi@0 | 560 | * to be used in dynamic invocation requests. |
aoqi@0 | 561 | * |
aoqi@0 | 562 | * @param oper the <code>OperationDef</code> object to use to create the list |
aoqi@0 | 563 | * @return a newly-created <code>NVList</code> object containing |
aoqi@0 | 564 | * descriptions of the arguments to the method described in the given |
aoqi@0 | 565 | * <code>OperationDef</code> object |
aoqi@0 | 566 | * |
aoqi@0 | 567 | * @see NVList |
aoqi@0 | 568 | */ |
aoqi@0 | 569 | public NVList create_operation_list(org.omg.CORBA.Object oper) |
aoqi@0 | 570 | { |
aoqi@0 | 571 | // If we came here, it means that the actual ORB implementation |
aoqi@0 | 572 | // did not have a create_operation_list(...CORBA.Object oper) method, |
aoqi@0 | 573 | // so lets check if it has a create_operation_list(OperationDef oper) |
aoqi@0 | 574 | // method. |
aoqi@0 | 575 | try { |
aoqi@0 | 576 | // First try to load the OperationDef class |
aoqi@0 | 577 | String opDefClassName = "org.omg.CORBA.OperationDef"; |
aoqi@0 | 578 | Class<?> opDefClass = null; |
aoqi@0 | 579 | |
aoqi@0 | 580 | ClassLoader cl = Thread.currentThread().getContextClassLoader(); |
aoqi@0 | 581 | if ( cl == null ) |
aoqi@0 | 582 | cl = ClassLoader.getSystemClassLoader(); |
aoqi@0 | 583 | // if this throws a ClassNotFoundException, it will be caught below. |
aoqi@0 | 584 | opDefClass = Class.forName(opDefClassName, true, cl); |
aoqi@0 | 585 | |
aoqi@0 | 586 | // OK, we loaded OperationDef. Now try to get the |
aoqi@0 | 587 | // create_operation_list(OperationDef oper) method. |
aoqi@0 | 588 | Class<?>[] argc = { opDefClass }; |
aoqi@0 | 589 | java.lang.reflect.Method meth = |
aoqi@0 | 590 | this.getClass().getMethod("create_operation_list", argc); |
aoqi@0 | 591 | |
aoqi@0 | 592 | // OK, the method exists, so invoke it and be happy. |
aoqi@0 | 593 | java.lang.Object[] argx = { oper }; |
aoqi@0 | 594 | return (org.omg.CORBA.NVList)meth.invoke(this, argx); |
aoqi@0 | 595 | } |
aoqi@0 | 596 | catch( java.lang.reflect.InvocationTargetException exs ) { |
aoqi@0 | 597 | Throwable t = exs.getTargetException(); |
aoqi@0 | 598 | if (t instanceof Error) { |
aoqi@0 | 599 | throw (Error) t; |
aoqi@0 | 600 | } |
aoqi@0 | 601 | else if (t instanceof RuntimeException) { |
aoqi@0 | 602 | throw (RuntimeException) t; |
aoqi@0 | 603 | } |
aoqi@0 | 604 | else { |
aoqi@0 | 605 | throw new org.omg.CORBA.NO_IMPLEMENT(); |
aoqi@0 | 606 | } |
aoqi@0 | 607 | } |
aoqi@0 | 608 | catch( RuntimeException ex ) { |
aoqi@0 | 609 | throw ex; |
aoqi@0 | 610 | } |
aoqi@0 | 611 | catch( Exception exr ) { |
aoqi@0 | 612 | throw new org.omg.CORBA.NO_IMPLEMENT(); |
aoqi@0 | 613 | } |
aoqi@0 | 614 | } |
aoqi@0 | 615 | |
aoqi@0 | 616 | |
aoqi@0 | 617 | /** |
aoqi@0 | 618 | * Creates a <code>NamedValue</code> object |
aoqi@0 | 619 | * using the given name, value, and argument mode flags. |
aoqi@0 | 620 | * <P> |
aoqi@0 | 621 | * A <code>NamedValue</code> object serves as (1) a parameter or return |
aoqi@0 | 622 | * value or (2) a context property. |
aoqi@0 | 623 | * It may be used by itself or |
aoqi@0 | 624 | * as an element in an <code>NVList</code> object. |
aoqi@0 | 625 | * |
aoqi@0 | 626 | * @param s the name of the <code>NamedValue</code> object |
aoqi@0 | 627 | * @param any the <code>Any</code> value to be inserted into the |
aoqi@0 | 628 | * <code>NamedValue</code> object |
aoqi@0 | 629 | * @param flags the argument mode flags for the <code>NamedValue</code>: one of |
aoqi@0 | 630 | * <code>ARG_IN.value</code>, <code>ARG_OUT.value</code>, |
aoqi@0 | 631 | * or <code>ARG_INOUT.value</code>. |
aoqi@0 | 632 | * |
aoqi@0 | 633 | * @return the newly-created <code>NamedValue</code> object |
aoqi@0 | 634 | * @see NamedValue |
aoqi@0 | 635 | */ |
aoqi@0 | 636 | abstract public NamedValue create_named_value(String s, Any any, int flags); |
aoqi@0 | 637 | |
aoqi@0 | 638 | /** |
aoqi@0 | 639 | * Creates an empty <code>ExceptionList</code> object. |
aoqi@0 | 640 | * |
aoqi@0 | 641 | * @return the newly-created <code>ExceptionList</code> object |
aoqi@0 | 642 | */ |
aoqi@0 | 643 | abstract public ExceptionList create_exception_list(); |
aoqi@0 | 644 | |
aoqi@0 | 645 | /** |
aoqi@0 | 646 | * Creates an empty <code>ContextList</code> object. |
aoqi@0 | 647 | * |
aoqi@0 | 648 | * @return the newly-created <code>ContextList</code> object |
aoqi@0 | 649 | * @see ContextList |
aoqi@0 | 650 | * @see Context |
aoqi@0 | 651 | */ |
aoqi@0 | 652 | abstract public ContextList create_context_list(); |
aoqi@0 | 653 | |
aoqi@0 | 654 | /** |
aoqi@0 | 655 | * Gets the default <code>Context</code> object. |
aoqi@0 | 656 | * |
aoqi@0 | 657 | * @return the default <code>Context</code> object |
aoqi@0 | 658 | * @see Context |
aoqi@0 | 659 | */ |
aoqi@0 | 660 | abstract public Context get_default_context(); |
aoqi@0 | 661 | |
aoqi@0 | 662 | /** |
aoqi@0 | 663 | * Creates an <code>Environment</code> object. |
aoqi@0 | 664 | * |
aoqi@0 | 665 | * @return the newly-created <code>Environment</code> object |
aoqi@0 | 666 | * @see Environment |
aoqi@0 | 667 | */ |
aoqi@0 | 668 | abstract public Environment create_environment(); |
aoqi@0 | 669 | |
aoqi@0 | 670 | /** |
aoqi@0 | 671 | * Creates a new <code>org.omg.CORBA.portable.OutputStream</code> into which |
aoqi@0 | 672 | * IDL method parameters can be marshalled during method invocation. |
aoqi@0 | 673 | * @return the newly-created |
aoqi@0 | 674 | * <code>org.omg.CORBA.portable.OutputStream</code> object |
aoqi@0 | 675 | */ |
aoqi@0 | 676 | abstract public org.omg.CORBA.portable.OutputStream create_output_stream(); |
aoqi@0 | 677 | |
aoqi@0 | 678 | /** |
aoqi@0 | 679 | * Sends multiple dynamic (DII) requests asynchronously without expecting |
aoqi@0 | 680 | * any responses. Note that oneway invocations are not guaranteed to |
aoqi@0 | 681 | * reach the server. |
aoqi@0 | 682 | * |
aoqi@0 | 683 | * @param req an array of request objects |
aoqi@0 | 684 | */ |
aoqi@0 | 685 | abstract public void send_multiple_requests_oneway(Request[] req); |
aoqi@0 | 686 | |
aoqi@0 | 687 | /** |
aoqi@0 | 688 | * Sends multiple dynamic (DII) requests asynchronously. |
aoqi@0 | 689 | * |
aoqi@0 | 690 | * @param req an array of <code>Request</code> objects |
aoqi@0 | 691 | */ |
aoqi@0 | 692 | abstract public void send_multiple_requests_deferred(Request[] req); |
aoqi@0 | 693 | |
aoqi@0 | 694 | /** |
aoqi@0 | 695 | * Finds out if any of the deferred (asynchronous) invocations have |
aoqi@0 | 696 | * a response yet. |
aoqi@0 | 697 | * @return <code>true</code> if there is a response available; |
aoqi@0 | 698 | * <code> false</code> otherwise |
aoqi@0 | 699 | */ |
aoqi@0 | 700 | abstract public boolean poll_next_response(); |
aoqi@0 | 701 | |
aoqi@0 | 702 | /** |
aoqi@0 | 703 | * Gets the next <code>Request</code> instance for which a response |
aoqi@0 | 704 | * has been received. |
aoqi@0 | 705 | * |
aoqi@0 | 706 | * @return the next <code>Request</code> object ready with a response |
aoqi@0 | 707 | * @exception WrongTransaction if the method <code>get_next_response</code> |
aoqi@0 | 708 | * is called from a transaction scope different |
aoqi@0 | 709 | * from the one from which the original request was sent. See the |
aoqi@0 | 710 | * OMG Transaction Service specification for details. |
aoqi@0 | 711 | */ |
aoqi@0 | 712 | abstract public Request get_next_response() throws WrongTransaction; |
aoqi@0 | 713 | |
aoqi@0 | 714 | /** |
aoqi@0 | 715 | * Retrieves the <code>TypeCode</code> object that represents |
aoqi@0 | 716 | * the given primitive IDL type. |
aoqi@0 | 717 | * |
aoqi@0 | 718 | * @param tcKind the <code>TCKind</code> instance corresponding to the |
aoqi@0 | 719 | * desired primitive type |
aoqi@0 | 720 | * @return the requested <code>TypeCode</code> object |
aoqi@0 | 721 | */ |
aoqi@0 | 722 | abstract public TypeCode get_primitive_tc(TCKind tcKind); |
aoqi@0 | 723 | |
aoqi@0 | 724 | /** |
aoqi@0 | 725 | * Creates a <code>TypeCode</code> object representing an IDL <code>struct</code>. |
aoqi@0 | 726 | * The <code>TypeCode</code> object is initialized with the given id, |
aoqi@0 | 727 | * name, and members. |
aoqi@0 | 728 | * |
aoqi@0 | 729 | * @param id the repository id for the <code>struct</code> |
aoqi@0 | 730 | * @param name the name of the <code>struct</code> |
aoqi@0 | 731 | * @param members an array describing the members of the <code>struct</code> |
aoqi@0 | 732 | * @return a newly-created <code>TypeCode</code> object describing |
aoqi@0 | 733 | * an IDL <code>struct</code> |
aoqi@0 | 734 | */ |
aoqi@0 | 735 | abstract public TypeCode create_struct_tc(String id, String name, |
aoqi@0 | 736 | StructMember[] members); |
aoqi@0 | 737 | |
aoqi@0 | 738 | /** |
aoqi@0 | 739 | * Creates a <code>TypeCode</code> object representing an IDL <code>union</code>. |
aoqi@0 | 740 | * The <code>TypeCode</code> object is initialized with the given id, |
aoqi@0 | 741 | * name, discriminator type, and members. |
aoqi@0 | 742 | * |
aoqi@0 | 743 | * @param id the repository id of the <code>union</code> |
aoqi@0 | 744 | * @param name the name of the <code>union</code> |
aoqi@0 | 745 | * @param discriminator_type the type of the <code>union</code> discriminator |
aoqi@0 | 746 | * @param members an array describing the members of the <code>union</code> |
aoqi@0 | 747 | * @return a newly-created <code>TypeCode</code> object describing |
aoqi@0 | 748 | * an IDL <code>union</code> |
aoqi@0 | 749 | */ |
aoqi@0 | 750 | abstract public TypeCode create_union_tc(String id, String name, |
aoqi@0 | 751 | TypeCode discriminator_type, |
aoqi@0 | 752 | UnionMember[] members); |
aoqi@0 | 753 | |
aoqi@0 | 754 | /** |
aoqi@0 | 755 | * Creates a <code>TypeCode</code> object representing an IDL <code>enum</code>. |
aoqi@0 | 756 | * The <code>TypeCode</code> object is initialized with the given id, |
aoqi@0 | 757 | * name, and members. |
aoqi@0 | 758 | * |
aoqi@0 | 759 | * @param id the repository id for the <code>enum</code> |
aoqi@0 | 760 | * @param name the name for the <code>enum</code> |
aoqi@0 | 761 | * @param members an array describing the members of the <code>enum</code> |
aoqi@0 | 762 | * @return a newly-created <code>TypeCode</code> object describing |
aoqi@0 | 763 | * an IDL <code>enum</code> |
aoqi@0 | 764 | */ |
aoqi@0 | 765 | abstract public TypeCode create_enum_tc(String id, String name, String[] members); |
aoqi@0 | 766 | |
aoqi@0 | 767 | /** |
aoqi@0 | 768 | * Creates a <code>TypeCode</code> object representing an IDL <code>alias</code> |
aoqi@0 | 769 | * (<code>typedef</code>). |
aoqi@0 | 770 | * The <code>TypeCode</code> object is initialized with the given id, |
aoqi@0 | 771 | * name, and original type. |
aoqi@0 | 772 | * |
aoqi@0 | 773 | * @param id the repository id for the alias |
aoqi@0 | 774 | * @param name the name for the alias |
aoqi@0 | 775 | * @param original_type |
aoqi@0 | 776 | * the <code>TypeCode</code> object describing the original type |
aoqi@0 | 777 | * for which this is an alias |
aoqi@0 | 778 | * @return a newly-created <code>TypeCode</code> object describing |
aoqi@0 | 779 | * an IDL <code>alias</code> |
aoqi@0 | 780 | */ |
aoqi@0 | 781 | abstract public TypeCode create_alias_tc(String id, String name, |
aoqi@0 | 782 | TypeCode original_type); |
aoqi@0 | 783 | |
aoqi@0 | 784 | /** |
aoqi@0 | 785 | * Creates a <code>TypeCode</code> object representing an IDL <code>exception</code>. |
aoqi@0 | 786 | * The <code>TypeCode</code> object is initialized with the given id, |
aoqi@0 | 787 | * name, and members. |
aoqi@0 | 788 | * |
aoqi@0 | 789 | * @param id the repository id for the <code>exception</code> |
aoqi@0 | 790 | * @param name the name for the <code>exception</code> |
aoqi@0 | 791 | * @param members an array describing the members of the <code>exception</code> |
aoqi@0 | 792 | * @return a newly-created <code>TypeCode</code> object describing |
aoqi@0 | 793 | * an IDL <code>exception</code> |
aoqi@0 | 794 | */ |
aoqi@0 | 795 | abstract public TypeCode create_exception_tc(String id, String name, |
aoqi@0 | 796 | StructMember[] members); |
aoqi@0 | 797 | |
aoqi@0 | 798 | /** |
aoqi@0 | 799 | * Creates a <code>TypeCode</code> object representing an IDL <code>interface</code>. |
aoqi@0 | 800 | * The <code>TypeCode</code> object is initialized with the given id |
aoqi@0 | 801 | * and name. |
aoqi@0 | 802 | * |
aoqi@0 | 803 | * @param id the repository id for the interface |
aoqi@0 | 804 | * @param name the name for the interface |
aoqi@0 | 805 | * @return a newly-created <code>TypeCode</code> object describing |
aoqi@0 | 806 | * an IDL <code>interface</code> |
aoqi@0 | 807 | */ |
aoqi@0 | 808 | |
aoqi@0 | 809 | abstract public TypeCode create_interface_tc(String id, String name); |
aoqi@0 | 810 | |
aoqi@0 | 811 | /** |
aoqi@0 | 812 | * Creates a <code>TypeCode</code> object representing a bounded IDL |
aoqi@0 | 813 | * <code>string</code>. |
aoqi@0 | 814 | * The <code>TypeCode</code> object is initialized with the given bound, |
aoqi@0 | 815 | * which represents the maximum length of the string. Zero indicates |
aoqi@0 | 816 | * that the string described by this type code is unbounded. |
aoqi@0 | 817 | * |
aoqi@0 | 818 | * @param bound the bound for the <code>string</code>; cannot be negative |
aoqi@0 | 819 | * @return a newly-created <code>TypeCode</code> object describing |
aoqi@0 | 820 | * a bounded IDL <code>string</code> |
aoqi@0 | 821 | * @exception BAD_PARAM if bound is a negative value |
aoqi@0 | 822 | */ |
aoqi@0 | 823 | |
aoqi@0 | 824 | abstract public TypeCode create_string_tc(int bound); |
aoqi@0 | 825 | |
aoqi@0 | 826 | /** |
aoqi@0 | 827 | * Creates a <code>TypeCode</code> object representing a bounded IDL |
aoqi@0 | 828 | * <code>wstring</code> (wide string). |
aoqi@0 | 829 | * The <code>TypeCode</code> object is initialized with the given bound, |
aoqi@0 | 830 | * which represents the maximum length of the wide string. Zero indicates |
aoqi@0 | 831 | * that the string described by this type code is unbounded. |
aoqi@0 | 832 | * |
aoqi@0 | 833 | * @param bound the bound for the <code>wstring</code>; cannot be negative |
aoqi@0 | 834 | * @return a newly-created <code>TypeCode</code> object describing |
aoqi@0 | 835 | * a bounded IDL <code>wstring</code> |
aoqi@0 | 836 | * @exception BAD_PARAM if bound is a negative value |
aoqi@0 | 837 | */ |
aoqi@0 | 838 | abstract public TypeCode create_wstring_tc(int bound); |
aoqi@0 | 839 | |
aoqi@0 | 840 | /** |
aoqi@0 | 841 | * Creates a <code>TypeCode</code> object representing an IDL <code>sequence</code>. |
aoqi@0 | 842 | * The <code>TypeCode</code> object is initialized with the given bound and |
aoqi@0 | 843 | * element type. |
aoqi@0 | 844 | * |
aoqi@0 | 845 | * @param bound the bound for the <code>sequence</code>, 0 if unbounded |
aoqi@0 | 846 | * @param element_type |
aoqi@0 | 847 | * the <code>TypeCode</code> object describing the elements |
aoqi@0 | 848 | * contained in the <code>sequence</code> |
aoqi@0 | 849 | * @return a newly-created <code>TypeCode</code> object describing |
aoqi@0 | 850 | * an IDL <code>sequence</code> |
aoqi@0 | 851 | */ |
aoqi@0 | 852 | abstract public TypeCode create_sequence_tc(int bound, TypeCode element_type); |
aoqi@0 | 853 | |
aoqi@0 | 854 | /** |
aoqi@0 | 855 | * Creates a <code>TypeCode</code> object representing a |
aoqi@0 | 856 | * a recursive IDL <code>sequence</code>. |
aoqi@0 | 857 | * <P> |
aoqi@0 | 858 | * For the IDL <code>struct</code> Node in following code fragment, |
aoqi@0 | 859 | * the offset parameter for creating its sequence would be 1: |
aoqi@0 | 860 | * <PRE> |
aoqi@0 | 861 | * Struct Node { |
aoqi@0 | 862 | * long value; |
aoqi@0 | 863 | * Sequence <Node> subnodes; |
aoqi@0 | 864 | * }; |
aoqi@0 | 865 | * </PRE> |
aoqi@0 | 866 | * |
aoqi@0 | 867 | * @param bound the bound for the sequence, 0 if unbounded |
aoqi@0 | 868 | * @param offset the index to the enclosing <code>TypeCode</code> object |
aoqi@0 | 869 | * that describes the elements of this sequence |
aoqi@0 | 870 | * @return a newly-created <code>TypeCode</code> object describing |
aoqi@0 | 871 | * a recursive sequence |
aoqi@0 | 872 | * @deprecated Use a combination of create_recursive_tc and create_sequence_tc instead |
aoqi@0 | 873 | * @see #create_recursive_tc(String) create_recursive_tc |
aoqi@0 | 874 | * @see #create_sequence_tc(int, TypeCode) create_sequence_tc |
aoqi@0 | 875 | */ |
aoqi@0 | 876 | @Deprecated |
aoqi@0 | 877 | abstract public TypeCode create_recursive_sequence_tc(int bound, int offset); |
aoqi@0 | 878 | |
aoqi@0 | 879 | /** |
aoqi@0 | 880 | * Creates a <code>TypeCode</code> object representing an IDL <code>array</code>. |
aoqi@0 | 881 | * The <code>TypeCode</code> object is initialized with the given length and |
aoqi@0 | 882 | * element type. |
aoqi@0 | 883 | * |
aoqi@0 | 884 | * @param length the length of the <code>array</code> |
aoqi@0 | 885 | * @param element_type a <code>TypeCode</code> object describing the type |
aoqi@0 | 886 | * of element contained in the <code>array</code> |
aoqi@0 | 887 | * @return a newly-created <code>TypeCode</code> object describing |
aoqi@0 | 888 | * an IDL <code>array</code> |
aoqi@0 | 889 | */ |
aoqi@0 | 890 | abstract public TypeCode create_array_tc(int length, TypeCode element_type); |
aoqi@0 | 891 | |
aoqi@0 | 892 | /** |
aoqi@0 | 893 | * Create a <code>TypeCode</code> object for an IDL native type. |
aoqi@0 | 894 | * |
aoqi@0 | 895 | * @param id the logical id for the native type. |
aoqi@0 | 896 | * @param name the name of the native type. |
aoqi@0 | 897 | * @return the requested TypeCode. |
aoqi@0 | 898 | */ |
aoqi@0 | 899 | public org.omg.CORBA.TypeCode create_native_tc(String id, |
aoqi@0 | 900 | String name) |
aoqi@0 | 901 | { |
aoqi@0 | 902 | throw new org.omg.CORBA.NO_IMPLEMENT(); |
aoqi@0 | 903 | } |
aoqi@0 | 904 | |
aoqi@0 | 905 | /** |
aoqi@0 | 906 | * Create a <code>TypeCode</code> object for an IDL abstract interface. |
aoqi@0 | 907 | * |
aoqi@0 | 908 | * @param id the logical id for the abstract interface type. |
aoqi@0 | 909 | * @param name the name of the abstract interface type. |
aoqi@0 | 910 | * @return the requested TypeCode. |
aoqi@0 | 911 | */ |
aoqi@0 | 912 | public org.omg.CORBA.TypeCode create_abstract_interface_tc( |
aoqi@0 | 913 | String id, |
aoqi@0 | 914 | String name) |
aoqi@0 | 915 | { |
aoqi@0 | 916 | throw new org.omg.CORBA.NO_IMPLEMENT(); |
aoqi@0 | 917 | } |
aoqi@0 | 918 | |
aoqi@0 | 919 | |
aoqi@0 | 920 | /** |
aoqi@0 | 921 | * Create a <code>TypeCode</code> object for an IDL fixed type. |
aoqi@0 | 922 | * |
aoqi@0 | 923 | * @param digits specifies the total number of decimal digits in the number |
aoqi@0 | 924 | * and must be from 1 to 31 inclusive. |
aoqi@0 | 925 | * @param scale specifies the position of the decimal point. |
aoqi@0 | 926 | * @return the requested TypeCode. |
aoqi@0 | 927 | */ |
aoqi@0 | 928 | public org.omg.CORBA.TypeCode create_fixed_tc(short digits, short scale) |
aoqi@0 | 929 | { |
aoqi@0 | 930 | throw new org.omg.CORBA.NO_IMPLEMENT(); |
aoqi@0 | 931 | } |
aoqi@0 | 932 | |
aoqi@0 | 933 | |
aoqi@0 | 934 | // orbos 98-01-18: Objects By Value -- begin |
aoqi@0 | 935 | |
aoqi@0 | 936 | |
aoqi@0 | 937 | /** |
aoqi@0 | 938 | * Create a <code>TypeCode</code> object for an IDL value type. |
aoqi@0 | 939 | * The concrete_base parameter is the TypeCode for the immediate |
aoqi@0 | 940 | * concrete valuetype base of the valuetype for which the TypeCode |
aoqi@0 | 941 | * is being created. |
aoqi@0 | 942 | * It may be null if the valuetype does not have a concrete base. |
aoqi@0 | 943 | * |
aoqi@0 | 944 | * @param id the logical id for the value type. |
aoqi@0 | 945 | * @param name the name of the value type. |
aoqi@0 | 946 | * @param type_modifier one of the value type modifier constants: |
aoqi@0 | 947 | * VM_NONE, VM_CUSTOM, VM_ABSTRACT or VM_TRUNCATABLE |
aoqi@0 | 948 | * @param concrete_base a <code>TypeCode</code> object |
aoqi@0 | 949 | * describing the concrete valuetype base |
aoqi@0 | 950 | * @param members an array containing the members of the value type |
aoqi@0 | 951 | * @return the requested TypeCode |
aoqi@0 | 952 | */ |
aoqi@0 | 953 | public org.omg.CORBA.TypeCode create_value_tc(String id, |
aoqi@0 | 954 | String name, |
aoqi@0 | 955 | short type_modifier, |
aoqi@0 | 956 | TypeCode concrete_base, |
aoqi@0 | 957 | ValueMember[] members) |
aoqi@0 | 958 | { |
aoqi@0 | 959 | throw new org.omg.CORBA.NO_IMPLEMENT(); |
aoqi@0 | 960 | } |
aoqi@0 | 961 | |
aoqi@0 | 962 | /** |
aoqi@0 | 963 | * Create a recursive <code>TypeCode</code> object which |
aoqi@0 | 964 | * serves as a placeholder for a concrete TypeCode during the process of creating |
aoqi@0 | 965 | * TypeCodes which contain recursion. The id parameter specifies the repository id of |
aoqi@0 | 966 | * the type for which the recursive TypeCode is serving as a placeholder. Once the |
aoqi@0 | 967 | * recursive TypeCode has been properly embedded in the enclosing TypeCode which |
aoqi@0 | 968 | * corresponds to the specified repository id, it will function as a normal TypeCode. |
aoqi@0 | 969 | * Invoking operations on the recursive TypeCode before it has been embedded in the |
aoqi@0 | 970 | * enclosing TypeCode will result in a <code>BAD_TYPECODE</code> exception. |
aoqi@0 | 971 | * <P> |
aoqi@0 | 972 | * For example, the following IDL type declaration contains recursion: |
aoqi@0 | 973 | * <PRE> |
aoqi@0 | 974 | * Struct Node { |
aoqi@0 | 975 | * Sequence<Node> subnodes; |
aoqi@0 | 976 | * }; |
aoqi@0 | 977 | * </PRE> |
aoqi@0 | 978 | * <P> |
aoqi@0 | 979 | * To create a TypeCode for struct Node, you would invoke the TypeCode creation |
aoqi@0 | 980 | * operations as shown below: |
aoqi@0 | 981 | * <PRE> |
aoqi@0 | 982 | * String nodeID = "IDL:Node:1.0"; |
aoqi@0 | 983 | * TypeCode recursiveSeqTC = orb.create_sequence_tc(0, orb.create_recursive_tc(nodeID)); |
aoqi@0 | 984 | * StructMember[] members = { new StructMember("subnodes", recursiveSeqTC, null) }; |
aoqi@0 | 985 | * TypeCode structNodeTC = orb.create_struct_tc(nodeID, "Node", members); |
aoqi@0 | 986 | * </PRE> |
aoqi@0 | 987 | * <P> |
aoqi@0 | 988 | * Also note that the following is an illegal IDL type declaration: |
aoqi@0 | 989 | * <PRE> |
aoqi@0 | 990 | * Struct Node { |
aoqi@0 | 991 | * Node next; |
aoqi@0 | 992 | * }; |
aoqi@0 | 993 | * </PRE> |
aoqi@0 | 994 | * <P> |
aoqi@0 | 995 | * Recursive types can only appear within sequences which can be empty. |
aoqi@0 | 996 | * That way marshaling problems, when transmitting the struct in an Any, are avoided. |
aoqi@0 | 997 | * <P> |
aoqi@0 | 998 | * @param id the logical id of the referenced type |
aoqi@0 | 999 | * @return the requested TypeCode |
aoqi@0 | 1000 | */ |
aoqi@0 | 1001 | public org.omg.CORBA.TypeCode create_recursive_tc(String id) { |
aoqi@0 | 1002 | // implemented in subclass |
aoqi@0 | 1003 | throw new org.omg.CORBA.NO_IMPLEMENT(); |
aoqi@0 | 1004 | } |
aoqi@0 | 1005 | |
aoqi@0 | 1006 | /** |
aoqi@0 | 1007 | * Creates a <code>TypeCode</code> object for an IDL value box. |
aoqi@0 | 1008 | * |
aoqi@0 | 1009 | * @param id the logical id for the value type |
aoqi@0 | 1010 | * @param name the name of the value type |
aoqi@0 | 1011 | * @param boxed_type the TypeCode for the type |
aoqi@0 | 1012 | * @return the requested TypeCode |
aoqi@0 | 1013 | */ |
aoqi@0 | 1014 | public org.omg.CORBA.TypeCode create_value_box_tc(String id, |
aoqi@0 | 1015 | String name, |
aoqi@0 | 1016 | TypeCode boxed_type) |
aoqi@0 | 1017 | { |
aoqi@0 | 1018 | // implemented in subclass |
aoqi@0 | 1019 | throw new org.omg.CORBA.NO_IMPLEMENT(); |
aoqi@0 | 1020 | } |
aoqi@0 | 1021 | |
aoqi@0 | 1022 | // orbos 98-01-18: Objects By Value -- end |
aoqi@0 | 1023 | |
aoqi@0 | 1024 | /** |
aoqi@0 | 1025 | * Creates an IDL <code>Any</code> object initialized to |
aoqi@0 | 1026 | * contain a <code>Typecode</code> object whose <code>kind</code> field |
aoqi@0 | 1027 | * is set to <code>TCKind.tc_null</code>. |
aoqi@0 | 1028 | * |
aoqi@0 | 1029 | * @return a newly-created <code>Any</code> object |
aoqi@0 | 1030 | */ |
aoqi@0 | 1031 | abstract public Any create_any(); |
aoqi@0 | 1032 | |
aoqi@0 | 1033 | |
aoqi@0 | 1034 | |
aoqi@0 | 1035 | |
aoqi@0 | 1036 | /** |
aoqi@0 | 1037 | * Retrieves a <code>Current</code> object. |
aoqi@0 | 1038 | * The <code>Current</code> interface is used to manage thread-specific |
aoqi@0 | 1039 | * information for use by services such as transactions and security. |
aoqi@0 | 1040 | * |
aoqi@0 | 1041 | * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
aoqi@0 | 1042 | * comments for unimplemented features</a> |
aoqi@0 | 1043 | * |
aoqi@0 | 1044 | * @return a newly-created <code>Current</code> object |
aoqi@0 | 1045 | * @deprecated use <code>resolve_initial_references</code>. |
aoqi@0 | 1046 | */ |
aoqi@0 | 1047 | @Deprecated |
aoqi@0 | 1048 | public org.omg.CORBA.Current get_current() |
aoqi@0 | 1049 | { |
aoqi@0 | 1050 | throw new org.omg.CORBA.NO_IMPLEMENT(); |
aoqi@0 | 1051 | } |
aoqi@0 | 1052 | |
aoqi@0 | 1053 | /** |
aoqi@0 | 1054 | * This operation blocks the current thread until the ORB has |
aoqi@0 | 1055 | * completed the shutdown process, initiated when some thread calls |
aoqi@0 | 1056 | * <code>shutdown</code>. It may be used by multiple threads which |
aoqi@0 | 1057 | * get all notified when the ORB shuts down. |
aoqi@0 | 1058 | * |
aoqi@0 | 1059 | */ |
aoqi@0 | 1060 | public void run() |
aoqi@0 | 1061 | { |
aoqi@0 | 1062 | throw new org.omg.CORBA.NO_IMPLEMENT(); |
aoqi@0 | 1063 | } |
aoqi@0 | 1064 | |
aoqi@0 | 1065 | /** |
aoqi@0 | 1066 | * Instructs the ORB to shut down, which causes all |
aoqi@0 | 1067 | * object adapters to shut down, in preparation for destruction.<br> |
aoqi@0 | 1068 | * If the <code>wait_for_completion</code> parameter |
aoqi@0 | 1069 | * is true, this operation blocks until all ORB processing (including |
aoqi@0 | 1070 | * processing of currently executing requests, object deactivation, |
aoqi@0 | 1071 | * and other object adapter operations) has completed. |
aoqi@0 | 1072 | * If an application does this in a thread that is currently servicing |
aoqi@0 | 1073 | * an invocation, the <code>BAD_INV_ORDER</code> system exception |
aoqi@0 | 1074 | * will be thrown with the OMG minor code 3, |
aoqi@0 | 1075 | * since blocking would result in a deadlock.<br> |
aoqi@0 | 1076 | * If the <code>wait_for_completion</code> parameter is <code>FALSE</code>, |
aoqi@0 | 1077 | * then shutdown may not have completed upon return.<p> |
aoqi@0 | 1078 | * While the ORB is in the process of shutting down, the ORB operates as normal, |
aoqi@0 | 1079 | * servicing incoming and outgoing requests until all requests have been completed. |
aoqi@0 | 1080 | * Once an ORB has shutdown, only object reference management operations |
aoqi@0 | 1081 | * may be invoked on the ORB or any object reference obtained from it. |
aoqi@0 | 1082 | * An application may also invoke the <code>destroy</code> operation on the ORB itself. |
aoqi@0 | 1083 | * Invoking any other operation will throw the <code>BAD_INV_ORDER</code> |
aoqi@0 | 1084 | * system exception with the OMG minor code 4.<p> |
aoqi@0 | 1085 | * The <code>ORB.run</code> method will return after |
aoqi@0 | 1086 | * <code>shutdown</code> has been called. |
aoqi@0 | 1087 | * |
aoqi@0 | 1088 | * @param wait_for_completion <code>true</code> if the call |
aoqi@0 | 1089 | * should block until the shutdown is complete; |
aoqi@0 | 1090 | * <code>false</code> if it should return immediately |
aoqi@0 | 1091 | * @throws org.omg.CORBA.BAD_INV_ORDER if the current thread is servicing |
aoqi@0 | 1092 | * an invocation |
aoqi@0 | 1093 | */ |
aoqi@0 | 1094 | public void shutdown(boolean wait_for_completion) |
aoqi@0 | 1095 | { |
aoqi@0 | 1096 | throw new org.omg.CORBA.NO_IMPLEMENT(); |
aoqi@0 | 1097 | } |
aoqi@0 | 1098 | |
aoqi@0 | 1099 | /** |
aoqi@0 | 1100 | * Returns <code>true</code> if the ORB needs the main thread to |
aoqi@0 | 1101 | * perform some work, and <code>false</code> if the ORB does not |
aoqi@0 | 1102 | * need the main thread. |
aoqi@0 | 1103 | * |
aoqi@0 | 1104 | * @return <code>true</code> if there is work pending, meaning that the ORB |
aoqi@0 | 1105 | * needs the main thread to perform some work; <code>false</code> |
aoqi@0 | 1106 | * if there is no work pending and thus the ORB does not need the |
aoqi@0 | 1107 | * main thread |
aoqi@0 | 1108 | * |
aoqi@0 | 1109 | */ |
aoqi@0 | 1110 | public boolean work_pending() |
aoqi@0 | 1111 | { |
aoqi@0 | 1112 | throw new org.omg.CORBA.NO_IMPLEMENT(); |
aoqi@0 | 1113 | } |
aoqi@0 | 1114 | |
aoqi@0 | 1115 | /** |
aoqi@0 | 1116 | * Performs an implementation-dependent unit of work if called |
aoqi@0 | 1117 | * by the main thread. Otherwise it does nothing. |
aoqi@0 | 1118 | * The methods <code>work_pending</code> and <code>perform_work</code> |
aoqi@0 | 1119 | * can be used in |
aoqi@0 | 1120 | * conjunction to implement a simple polling loop that multiplexes |
aoqi@0 | 1121 | * the main thread among the ORB and other activities. |
aoqi@0 | 1122 | * |
aoqi@0 | 1123 | */ |
aoqi@0 | 1124 | public void perform_work() |
aoqi@0 | 1125 | { |
aoqi@0 | 1126 | throw new org.omg.CORBA.NO_IMPLEMENT(); |
aoqi@0 | 1127 | } |
aoqi@0 | 1128 | |
aoqi@0 | 1129 | /** |
aoqi@0 | 1130 | * Used to obtain information about CORBA facilities and services |
aoqi@0 | 1131 | * that are supported by this ORB. The service type for which |
aoqi@0 | 1132 | * information is being requested is passed in as the in |
aoqi@0 | 1133 | * parameter <tt>service_type</tt>, the values defined by |
aoqi@0 | 1134 | * constants in the CORBA module. If service information is |
aoqi@0 | 1135 | * available for that type, that is returned in the out parameter |
aoqi@0 | 1136 | * <tt>service_info</tt>, and the operation returns the |
aoqi@0 | 1137 | * value <tt>true</tt>. If no information for the requested |
aoqi@0 | 1138 | * services type is available, the operation returns <tt>false</tt> |
aoqi@0 | 1139 | * (i.e., the service is not supported by this ORB). |
aoqi@0 | 1140 | * <P> |
aoqi@0 | 1141 | * @param service_type a <code>short</code> indicating the |
aoqi@0 | 1142 | * service type for which information is being requested |
aoqi@0 | 1143 | * @param service_info a <code>ServiceInformationHolder</code> object |
aoqi@0 | 1144 | * that will hold the <code>ServiceInformation</code> object |
aoqi@0 | 1145 | * produced by this method |
aoqi@0 | 1146 | * @return <code>true</code> if service information is available |
aoqi@0 | 1147 | * for the <tt>service_type</tt>; |
aoqi@0 | 1148 | * <tt>false</tt> if no information for the |
aoqi@0 | 1149 | * requested services type is available |
aoqi@0 | 1150 | * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
aoqi@0 | 1151 | * comments for unimplemented features</a> |
aoqi@0 | 1152 | */ |
aoqi@0 | 1153 | public boolean get_service_information(short service_type, |
aoqi@0 | 1154 | ServiceInformationHolder service_info) |
aoqi@0 | 1155 | { |
aoqi@0 | 1156 | throw new org.omg.CORBA.NO_IMPLEMENT(); |
aoqi@0 | 1157 | } |
aoqi@0 | 1158 | |
aoqi@0 | 1159 | // orbos 98-01-18: Objects By Value -- begin |
aoqi@0 | 1160 | |
aoqi@0 | 1161 | /** |
aoqi@0 | 1162 | * Creates a new <code>DynAny</code> object from the given |
aoqi@0 | 1163 | * <code>Any</code> object. |
aoqi@0 | 1164 | * <P> |
aoqi@0 | 1165 | * @param value the <code>Any</code> object from which to create a new |
aoqi@0 | 1166 | * <code>DynAny</code> object |
aoqi@0 | 1167 | * @return the new <code>DynAny</code> object created from the given |
aoqi@0 | 1168 | * <code>Any</code> object |
aoqi@0 | 1169 | * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
aoqi@0 | 1170 | * comments for unimplemented features</a> |
aoqi@0 | 1171 | * @deprecated Use the new <a href="../DynamicAny/DynAnyFactory.html">DynAnyFactory</a> API instead |
aoqi@0 | 1172 | */ |
aoqi@0 | 1173 | @Deprecated |
aoqi@0 | 1174 | public org.omg.CORBA.DynAny create_dyn_any(org.omg.CORBA.Any value) |
aoqi@0 | 1175 | { |
aoqi@0 | 1176 | throw new org.omg.CORBA.NO_IMPLEMENT(); |
aoqi@0 | 1177 | } |
aoqi@0 | 1178 | |
aoqi@0 | 1179 | /** |
aoqi@0 | 1180 | * Creates a basic <code>DynAny</code> object from the given |
aoqi@0 | 1181 | * <code>TypeCode</code> object. |
aoqi@0 | 1182 | * <P> |
aoqi@0 | 1183 | * @param type the <code>TypeCode</code> object from which to create a new |
aoqi@0 | 1184 | * <code>DynAny</code> object |
aoqi@0 | 1185 | * @return the new <code>DynAny</code> object created from the given |
aoqi@0 | 1186 | * <code>TypeCode</code> object |
aoqi@0 | 1187 | * @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given |
aoqi@0 | 1188 | * <code>TypeCode</code> object is not consistent with the operation. |
aoqi@0 | 1189 | * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
aoqi@0 | 1190 | * comments for unimplemented features</a> |
aoqi@0 | 1191 | * @deprecated Use the new <a href="../DynamicAny/DynAnyFactory.html">DynAnyFactory</a> API instead |
aoqi@0 | 1192 | */ |
aoqi@0 | 1193 | @Deprecated |
aoqi@0 | 1194 | public org.omg.CORBA.DynAny create_basic_dyn_any(org.omg.CORBA.TypeCode type) throws org.omg.CORBA.ORBPackage.InconsistentTypeCode |
aoqi@0 | 1195 | { |
aoqi@0 | 1196 | throw new org.omg.CORBA.NO_IMPLEMENT(); |
aoqi@0 | 1197 | } |
aoqi@0 | 1198 | |
aoqi@0 | 1199 | /** |
aoqi@0 | 1200 | * Creates a new <code>DynStruct</code> object from the given |
aoqi@0 | 1201 | * <code>TypeCode</code> object. |
aoqi@0 | 1202 | * <P> |
aoqi@0 | 1203 | * @param type the <code>TypeCode</code> object from which to create a new |
aoqi@0 | 1204 | * <code>DynStruct</code> object |
aoqi@0 | 1205 | * @return the new <code>DynStruct</code> object created from the given |
aoqi@0 | 1206 | * <code>TypeCode</code> object |
aoqi@0 | 1207 | * @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given |
aoqi@0 | 1208 | * <code>TypeCode</code> object is not consistent with the operation. |
aoqi@0 | 1209 | * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
aoqi@0 | 1210 | * comments for unimplemented features</a> |
aoqi@0 | 1211 | * @deprecated Use the new <a href="../DynamicAny/DynAnyFactory.html">DynAnyFactory</a> API instead |
aoqi@0 | 1212 | */ |
aoqi@0 | 1213 | @Deprecated |
aoqi@0 | 1214 | public org.omg.CORBA.DynStruct create_dyn_struct(org.omg.CORBA.TypeCode type) throws org.omg.CORBA.ORBPackage.InconsistentTypeCode |
aoqi@0 | 1215 | { |
aoqi@0 | 1216 | throw new org.omg.CORBA.NO_IMPLEMENT(); |
aoqi@0 | 1217 | } |
aoqi@0 | 1218 | |
aoqi@0 | 1219 | /** |
aoqi@0 | 1220 | * Creates a new <code>DynSequence</code> object from the given |
aoqi@0 | 1221 | * <code>TypeCode</code> object. |
aoqi@0 | 1222 | * <P> |
aoqi@0 | 1223 | * @param type the <code>TypeCode</code> object from which to create a new |
aoqi@0 | 1224 | * <code>DynSequence</code> object |
aoqi@0 | 1225 | * @return the new <code>DynSequence</code> object created from the given |
aoqi@0 | 1226 | * <code>TypeCode</code> object |
aoqi@0 | 1227 | * @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given |
aoqi@0 | 1228 | * <code>TypeCode</code> object is not consistent with the operation. |
aoqi@0 | 1229 | * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
aoqi@0 | 1230 | * comments for unimplemented features</a> |
aoqi@0 | 1231 | * @deprecated Use the new <a href="../DynamicAny/DynAnyFactory.html">DynAnyFactory</a> API instead |
aoqi@0 | 1232 | */ |
aoqi@0 | 1233 | @Deprecated |
aoqi@0 | 1234 | public org.omg.CORBA.DynSequence create_dyn_sequence(org.omg.CORBA.TypeCode type) throws org.omg.CORBA.ORBPackage.InconsistentTypeCode |
aoqi@0 | 1235 | { |
aoqi@0 | 1236 | throw new org.omg.CORBA.NO_IMPLEMENT(); |
aoqi@0 | 1237 | } |
aoqi@0 | 1238 | |
aoqi@0 | 1239 | |
aoqi@0 | 1240 | /** |
aoqi@0 | 1241 | * Creates a new <code>DynArray</code> object from the given |
aoqi@0 | 1242 | * <code>TypeCode</code> object. |
aoqi@0 | 1243 | * <P> |
aoqi@0 | 1244 | * @param type the <code>TypeCode</code> object from which to create a new |
aoqi@0 | 1245 | * <code>DynArray</code> object |
aoqi@0 | 1246 | * @return the new <code>DynArray</code> object created from the given |
aoqi@0 | 1247 | * <code>TypeCode</code> object |
aoqi@0 | 1248 | * @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given |
aoqi@0 | 1249 | * <code>TypeCode</code> object is not consistent with the operation. |
aoqi@0 | 1250 | * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
aoqi@0 | 1251 | * comments for unimplemented features</a> |
aoqi@0 | 1252 | * @deprecated Use the new <a href="../DynamicAny/DynAnyFactory.html">DynAnyFactory</a> API instead |
aoqi@0 | 1253 | */ |
aoqi@0 | 1254 | @Deprecated |
aoqi@0 | 1255 | public org.omg.CORBA.DynArray create_dyn_array(org.omg.CORBA.TypeCode type) throws org.omg.CORBA.ORBPackage.InconsistentTypeCode |
aoqi@0 | 1256 | { |
aoqi@0 | 1257 | throw new org.omg.CORBA.NO_IMPLEMENT(); |
aoqi@0 | 1258 | } |
aoqi@0 | 1259 | |
aoqi@0 | 1260 | /** |
aoqi@0 | 1261 | * Creates a new <code>DynUnion</code> object from the given |
aoqi@0 | 1262 | * <code>TypeCode</code> object. |
aoqi@0 | 1263 | * <P> |
aoqi@0 | 1264 | * @param type the <code>TypeCode</code> object from which to create a new |
aoqi@0 | 1265 | * <code>DynUnion</code> object |
aoqi@0 | 1266 | * @return the new <code>DynUnion</code> object created from the given |
aoqi@0 | 1267 | * <code>TypeCode</code> object |
aoqi@0 | 1268 | * @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given |
aoqi@0 | 1269 | * <code>TypeCode</code> object is not consistent with the operation. |
aoqi@0 | 1270 | * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
aoqi@0 | 1271 | * comments for unimplemented features</a> |
aoqi@0 | 1272 | * @deprecated Use the new <a href="../DynamicAny/DynAnyFactory.html">DynAnyFactory</a> API instead |
aoqi@0 | 1273 | */ |
aoqi@0 | 1274 | @Deprecated |
aoqi@0 | 1275 | public org.omg.CORBA.DynUnion create_dyn_union(org.omg.CORBA.TypeCode type) throws org.omg.CORBA.ORBPackage.InconsistentTypeCode |
aoqi@0 | 1276 | { |
aoqi@0 | 1277 | throw new org.omg.CORBA.NO_IMPLEMENT(); |
aoqi@0 | 1278 | } |
aoqi@0 | 1279 | |
aoqi@0 | 1280 | /** |
aoqi@0 | 1281 | * Creates a new <code>DynEnum</code> object from the given |
aoqi@0 | 1282 | * <code>TypeCode</code> object. |
aoqi@0 | 1283 | * <P> |
aoqi@0 | 1284 | * @param type the <code>TypeCode</code> object from which to create a new |
aoqi@0 | 1285 | * <code>DynEnum</code> object |
aoqi@0 | 1286 | * @return the new <code>DynEnum</code> object created from the given |
aoqi@0 | 1287 | * <code>TypeCode</code> object |
aoqi@0 | 1288 | * @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given |
aoqi@0 | 1289 | * <code>TypeCode</code> object is not consistent with the operation. |
aoqi@0 | 1290 | * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
aoqi@0 | 1291 | * comments for unimplemented features</a> |
aoqi@0 | 1292 | * @deprecated Use the new <a href="../DynamicAny/DynAnyFactory.html">DynAnyFactory</a> API instead |
aoqi@0 | 1293 | */ |
aoqi@0 | 1294 | @Deprecated |
aoqi@0 | 1295 | public org.omg.CORBA.DynEnum create_dyn_enum(org.omg.CORBA.TypeCode type) throws org.omg.CORBA.ORBPackage.InconsistentTypeCode |
aoqi@0 | 1296 | { |
aoqi@0 | 1297 | throw new org.omg.CORBA.NO_IMPLEMENT(); |
aoqi@0 | 1298 | } |
aoqi@0 | 1299 | |
aoqi@0 | 1300 | /** |
aoqi@0 | 1301 | * Can be invoked to create new instances of policy objects |
aoqi@0 | 1302 | * of a specific type with specified initial state. If |
aoqi@0 | 1303 | * <tt>create_policy</tt> fails to instantiate a new Policy |
aoqi@0 | 1304 | * object due to its inability to interpret the requested type |
aoqi@0 | 1305 | * and content of the policy, it raises the <tt>PolicyError</tt> |
aoqi@0 | 1306 | * exception with the appropriate reason. |
aoqi@0 | 1307 | * @param type the <tt>PolicyType</tt> of the policy object to |
aoqi@0 | 1308 | * be created |
aoqi@0 | 1309 | * @param val the value that will be used to set the initial |
aoqi@0 | 1310 | * state of the <tt>Policy</tt> object that is created |
aoqi@0 | 1311 | * @return Reference to a newly created <tt>Policy</tt> object |
aoqi@0 | 1312 | * of type specified by the <tt>type</tt> parameter and |
aoqi@0 | 1313 | * initialized to a state specified by the <tt>val</tt> |
aoqi@0 | 1314 | * parameter |
aoqi@0 | 1315 | * @throws <tt>org.omg.CORBA.PolicyError</tt> when the requested |
aoqi@0 | 1316 | * policy is not supported or a requested initial state |
aoqi@0 | 1317 | * for the policy is not supported. |
aoqi@0 | 1318 | */ |
aoqi@0 | 1319 | public org.omg.CORBA.Policy create_policy(int type, org.omg.CORBA.Any val) |
aoqi@0 | 1320 | throws org.omg.CORBA.PolicyError |
aoqi@0 | 1321 | { |
aoqi@0 | 1322 | // Currently not implemented until PIORB. |
aoqi@0 | 1323 | throw new org.omg.CORBA.NO_IMPLEMENT(); |
aoqi@0 | 1324 | } |
aoqi@0 | 1325 | } |