1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/share/classes/org/omg/CORBA/ORB.java Sat Dec 01 00:00:00 2007 +0000 1.3 @@ -0,0 +1,1324 @@ 1.4 +/* 1.5 + * Copyright 1995-2005 Sun Microsystems, Inc. All Rights Reserved. 1.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.7 + * 1.8 + * This code is free software; you can redistribute it and/or modify it 1.9 + * under the terms of the GNU General Public License version 2 only, as 1.10 + * published by the Free Software Foundation. Sun designates this 1.11 + * particular file as subject to the "Classpath" exception as provided 1.12 + * by Sun in the LICENSE file that accompanied this code. 1.13 + * 1.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 1.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1.17 + * version 2 for more details (a copy is included in the LICENSE file that 1.18 + * accompanied this code). 1.19 + * 1.20 + * You should have received a copy of the GNU General Public License version 1.21 + * 2 along with this work; if not, write to the Free Software Foundation, 1.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1.23 + * 1.24 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 1.25 + * CA 95054 USA or visit www.sun.com if you need additional information or 1.26 + * have any questions. 1.27 + */ 1.28 + 1.29 +package org.omg.CORBA; 1.30 + 1.31 +import org.omg.CORBA.portable.*; 1.32 +import org.omg.CORBA.ORBPackage.InvalidName; 1.33 + 1.34 +import java.util.Properties; 1.35 +import java.applet.Applet; 1.36 +import java.io.File; 1.37 +import java.io.FileInputStream; 1.38 + 1.39 +import java.security.AccessController; 1.40 +import java.security.PrivilegedAction; 1.41 + 1.42 +/** 1.43 + * A class providing APIs for the CORBA Object Request Broker 1.44 + * features. The <code>ORB</code> class also provides 1.45 + * "pluggable ORB implementation" APIs that allow another vendor's ORB 1.46 + * implementation to be used. 1.47 + * <P> 1.48 + * An ORB makes it possible for CORBA objects to communicate 1.49 + * with each other by connecting objects making requests (clients) with 1.50 + * objects servicing requests (servers). 1.51 + * <P> 1.52 + * 1.53 + * The <code>ORB</code> class, which 1.54 + * encapsulates generic CORBA functionality, does the following: 1.55 + * (Note that items 5 and 6, which include most of the methods in 1.56 + * the class <code>ORB</code>, are typically used with the <code>Dynamic Invocation 1.57 + * Interface</code> (DII) and the <code>Dynamic Skeleton Interface</code> 1.58 + * (DSI). 1.59 + * These interfaces may be used by a developer directly, but 1.60 + * most commonly they are used by the ORB internally and are 1.61 + * not seen by the general programmer.) 1.62 + * <OL> 1.63 + * <li> initializes the ORB implementation by supplying values for 1.64 + * predefined properties and environmental parameters 1.65 + * <li> obtains initial object references to services such as 1.66 + * the NameService using the method <code>resolve_initial_references</code> 1.67 + * <li> converts object references to strings and back 1.68 + * <li> connects the ORB to a servant (an instance of a CORBA object 1.69 + * implementation) and disconnects the ORB from a servant 1.70 + * <li> creates objects such as 1.71 + * <ul> 1.72 + * <li><code>TypeCode</code> 1.73 + * <li><code>Any</code> 1.74 + * <li><code>NamedValue</code> 1.75 + * <li><code>Context</code> 1.76 + * <li><code>Environment</code> 1.77 + * <li>lists (such as <code>NVList</code>) containing these objects 1.78 + * </ul> 1.79 + * <li> sends multiple messages in the DII 1.80 + * </OL> 1.81 + * 1.82 + * <P> 1.83 + * The <code>ORB</code> class can be used to obtain references to objects 1.84 + * implemented anywhere on the network. 1.85 + * <P> 1.86 + * An application or applet gains access to the CORBA environment 1.87 + * by initializing itself into an <code>ORB</code> using one of 1.88 + * three <code>init</code> methods. Two of the three methods use the properties 1.89 + * (associations of a name with a value) shown in the 1.90 + * table below.<BR> 1.91 + * <TABLE BORDER=1 SUMMARY="Standard Java CORBA Properties"> 1.92 + * <TR><TH>Property Name</TH> <TH>Property Value</TH></TR> 1.93 + * <CAPTION>Standard Java CORBA Properties:</CAPTION> 1.94 + * <TR><TD>org.omg.CORBA.ORBClass</TD> 1.95 + * <TD>class name of an ORB implementation</TD></TR> 1.96 + * <TR><TD>org.omg.CORBA.ORBSingletonClass</TD> 1.97 + * <TD>class name of the ORB returned by <code>init()</code></TD></TR> 1.98 + * </TABLE> 1.99 + * <P> 1.100 + * These properties allow a different vendor's <code>ORB</code> 1.101 + * implementation to be "plugged in." 1.102 + * <P> 1.103 + * When an ORB instance is being created, the class name of the ORB 1.104 + * implementation is located using 1.105 + * the following standard search order:<P> 1.106 + * 1.107 + * <OL> 1.108 + * <LI>check in Applet parameter or application string array, if any 1.109 + * 1.110 + * <LI>check in properties parameter, if any 1.111 + * 1.112 + * <LI>check in the System properties 1.113 + * 1.114 + * <LI>check in the orb.properties file located in the user.home 1.115 + * directory (if any) 1.116 + * 1.117 + * <LI>check in the orb.properties file located in the java.home/lib 1.118 + * directory (if any) 1.119 + * 1.120 + * <LI>fall back on a hardcoded default behavior (use the Java IDL 1.121 + * implementation) 1.122 + * </OL> 1.123 + * <P> 1.124 + * Note that Java IDL provides a default implementation for the 1.125 + * fully-functional ORB and for the Singleton ORB. When the method 1.126 + * <code>init</code> is given no parameters, the default Singleton 1.127 + * ORB is returned. When the method <code>init</code> is given parameters 1.128 + * but no ORB class is specified, the Java IDL ORB implementation 1.129 + * is returned. 1.130 + * <P> 1.131 + * The following code fragment creates an <code>ORB</code> object 1.132 + * initialized with the default ORB Singleton. 1.133 + * This ORB has a 1.134 + * restricted implementation to prevent malicious applets from doing 1.135 + * anything beyond creating typecodes. 1.136 + * It is called a singleton 1.137 + * because there is only one instance for an entire virtual machine. 1.138 + * <PRE> 1.139 + * ORB orb = ORB.init(); 1.140 + * </PRE> 1.141 + * <P> 1.142 + * The following code fragment creates an <code>ORB</code> object 1.143 + * for an application. The parameter <code>args</code> 1.144 + * represents the arguments supplied to the application's <code>main</code> 1.145 + * method. Since the property specifies the ORB class to be 1.146 + * "SomeORBImplementation", the new ORB will be initialized with 1.147 + * that ORB implementation. If p had been null, 1.148 + * and the arguments had not specified an ORB class, 1.149 + * the new ORB would have been 1.150 + * initialized with the default Java IDL implementation. 1.151 + * <PRE> 1.152 + * Properties p = new Properties(); 1.153 + * p.put("org.omg.CORBA.ORBClass", "SomeORBImplementation"); 1.154 + * ORB orb = ORB.init(args, p); 1.155 + * </PRE> 1.156 + * <P> 1.157 + * The following code fragment creates an <code>ORB</code> object 1.158 + * for the applet supplied as the first parameter. If the given 1.159 + * applet does not specify an ORB class, the new ORB will be 1.160 + * initialized with the default Java IDL implementation. 1.161 + * <PRE> 1.162 + * ORB orb = ORB.init(myApplet, null); 1.163 + * </PRE> 1.164 + * <P> 1.165 + * An application or applet can be initialized in one or more ORBs. 1.166 + * ORB initialization is a bootstrap call into the CORBA world. 1.167 + * @since JDK1.2 1.168 + */ 1.169 +abstract public class ORB { 1.170 + 1.171 + // 1.172 + // This is the ORB implementation used when nothing else is specified. 1.173 + // Whoever provides this class customizes this string to 1.174 + // point at their ORB implementation. 1.175 + // 1.176 + private static final String ORBClassKey = "org.omg.CORBA.ORBClass"; 1.177 + private static final String ORBSingletonClassKey = "org.omg.CORBA.ORBSingletonClass"; 1.178 + 1.179 + // 1.180 + // The last resort fallback ORB implementation classes in case 1.181 + // no ORB implementation class is dynamically configured through 1.182 + // properties or applet parameters. Change these values to 1.183 + // vendor-specific class names. 1.184 + // 1.185 + private static final String defaultORB = "com.sun.corba.se.impl.orb.ORBImpl"; 1.186 + private static final String defaultORBSingleton = "com.sun.corba.se.impl.orb.ORBSingleton"; 1.187 + 1.188 + // 1.189 + // The global instance of the singleton ORB implementation which 1.190 + // acts as a factory for typecodes for generated Helper classes. 1.191 + // TypeCodes should be immutable since they may be shared across 1.192 + // different security contexts (applets). There should be no way to 1.193 + // use a TypeCode as a storage depot for illicitly passing 1.194 + // information or Java objects between different security contexts. 1.195 + // 1.196 + static private ORB singleton; 1.197 + 1.198 + // Get System property 1.199 + private static String getSystemProperty(final String name) { 1.200 + 1.201 + // This will not throw a SecurityException because this 1.202 + // class was loaded from rt.jar using the bootstrap classloader. 1.203 + String propValue = (String) AccessController.doPrivileged( 1.204 + new PrivilegedAction() { 1.205 + public java.lang.Object run() { 1.206 + return System.getProperty(name); 1.207 + } 1.208 + } 1.209 + ); 1.210 + 1.211 + return propValue; 1.212 + } 1.213 + 1.214 + // Get property from orb.properties in either <user.home> or <java-home>/lib 1.215 + // directories. 1.216 + private static String getPropertyFromFile(final String name) { 1.217 + // This will not throw a SecurityException because this 1.218 + // class was loaded from rt.jar using the bootstrap classloader. 1.219 + 1.220 + String propValue = (String) AccessController.doPrivileged( 1.221 + new PrivilegedAction() { 1.222 + private Properties getFileProperties( String fileName ) { 1.223 + try { 1.224 + File propFile = new File( fileName ) ; 1.225 + if (!propFile.exists()) 1.226 + return null ; 1.227 + 1.228 + Properties props = new Properties() ; 1.229 + FileInputStream fis = new FileInputStream(propFile); 1.230 + try { 1.231 + props.load( fis ); 1.232 + } finally { 1.233 + fis.close() ; 1.234 + } 1.235 + 1.236 + return props ; 1.237 + } catch (Exception exc) { 1.238 + return null ; 1.239 + } 1.240 + } 1.241 + 1.242 + public java.lang.Object run() { 1.243 + String userHome = System.getProperty("user.home"); 1.244 + String fileName = userHome + File.separator + 1.245 + "orb.properties" ; 1.246 + Properties props = getFileProperties( fileName ) ; 1.247 + 1.248 + if (props != null) { 1.249 + String value = props.getProperty( name ) ; 1.250 + if (value != null) 1.251 + return value ; 1.252 + } 1.253 + 1.254 + String javaHome = System.getProperty("java.home"); 1.255 + fileName = javaHome + File.separator 1.256 + + "lib" + File.separator + "orb.properties"; 1.257 + props = getFileProperties( fileName ) ; 1.258 + 1.259 + if (props == null) 1.260 + return null ; 1.261 + else 1.262 + return props.getProperty( name ) ; 1.263 + } 1.264 + } 1.265 + ); 1.266 + 1.267 + return propValue; 1.268 + } 1.269 + 1.270 + /** 1.271 + * Returns the <code>ORB</code> singleton object. This method always returns the 1.272 + * same ORB instance, which is an instance of the class described by the 1.273 + * <code>org.omg.CORBA.ORBSingletonClass</code> system property. 1.274 + * <P> 1.275 + * This no-argument version of the method <code>init</code> is used primarily 1.276 + * as a factory for <code>TypeCode</code> objects, which are used by 1.277 + * <code>Helper</code> classes to implement the method <code>type</code>. 1.278 + * It is also used to create <code>Any</code> objects that are used to 1.279 + * describe <code>union</code> labels (as part of creating a <code> 1.280 + * TypeCode</code> object for a <code>union</code>). 1.281 + * <P> 1.282 + * This method is not intended to be used by applets, and in the event 1.283 + * that it is called in an applet environment, the ORB it returns 1.284 + * is restricted so that it can be used only as a factory for 1.285 + * <code>TypeCode</code> objects. Any <code>TypeCode</code> objects 1.286 + * it produces can be safely shared among untrusted applets. 1.287 + * <P> 1.288 + * If an ORB is created using this method from an applet, 1.289 + * a system exception will be thrown if 1.290 + * methods other than those for 1.291 + * creating <code>TypeCode</code> objects are invoked. 1.292 + * 1.293 + * @return the singleton ORB 1.294 + */ 1.295 + public static ORB init() { 1.296 + if (singleton == null) { 1.297 + String className = getSystemProperty(ORBSingletonClassKey); 1.298 + if (className == null) 1.299 + className = getPropertyFromFile(ORBSingletonClassKey); 1.300 + if (className == null) 1.301 + className = defaultORBSingleton; 1.302 + 1.303 + singleton = create_impl(className); 1.304 + } 1.305 + return singleton; 1.306 + } 1.307 + 1.308 + private static ORB create_impl(String className) { 1.309 + 1.310 + ClassLoader cl = Thread.currentThread().getContextClassLoader(); 1.311 + if (cl == null) 1.312 + cl = ClassLoader.getSystemClassLoader(); 1.313 + 1.314 + try { 1.315 + return (ORB) Class.forName(className, true, cl).newInstance(); 1.316 + } catch (Throwable ex) { 1.317 + SystemException systemException = new INITIALIZE( 1.318 + "can't instantiate default ORB implementation " + className); 1.319 + systemException.initCause(ex); 1.320 + throw systemException; 1.321 + } 1.322 + } 1.323 + 1.324 + /** 1.325 + * Creates a new <code>ORB</code> instance for a standalone 1.326 + * application. This method may be called from applications 1.327 + * only and returns a new fully functional <code>ORB</code> object 1.328 + * each time it is called. 1.329 + * @param args command-line arguments for the application's <code>main</code> 1.330 + * method; may be <code>null</code> 1.331 + * @param props application-specific properties; may be <code>null</code> 1.332 + * @return the newly-created ORB instance 1.333 + */ 1.334 + public static ORB init(String[] args, Properties props) { 1.335 + // 1.336 + // Note that there is no standard command-line argument for 1.337 + // specifying the default ORB implementation. For an 1.338 + // application you can choose an implementation either by 1.339 + // setting the CLASSPATH to pick a different org.omg.CORBA 1.340 + // and it's baked-in ORB implementation default or by 1.341 + // setting an entry in the properties object or in the 1.342 + // system properties. 1.343 + // 1.344 + String className = null; 1.345 + ORB orb; 1.346 + 1.347 + if (props != null) 1.348 + className = props.getProperty(ORBClassKey); 1.349 + if (className == null) 1.350 + className = getSystemProperty(ORBClassKey); 1.351 + if (className == null) 1.352 + className = getPropertyFromFile(ORBClassKey); 1.353 + if (className == null) 1.354 + className = defaultORB; 1.355 + 1.356 + orb = create_impl(className); 1.357 + orb.set_parameters(args, props); 1.358 + return orb; 1.359 + } 1.360 + 1.361 + 1.362 + /** 1.363 + * Creates a new <code>ORB</code> instance for an applet. This 1.364 + * method may be called from applets only and returns a new 1.365 + * fully-functional <code>ORB</code> object each time it is called. 1.366 + * @param app the applet; may be <code>null</code> 1.367 + * @param props applet-specific properties; may be <code>null</code> 1.368 + * @return the newly-created ORB instance 1.369 + */ 1.370 + public static ORB init(Applet app, Properties props) { 1.371 + String className; 1.372 + ORB orb; 1.373 + 1.374 + className = app.getParameter(ORBClassKey); 1.375 + if (className == null && props != null) 1.376 + className = props.getProperty(ORBClassKey); 1.377 + if (className == null) 1.378 + className = getSystemProperty(ORBClassKey); 1.379 + if (className == null) 1.380 + className = getPropertyFromFile(ORBClassKey); 1.381 + if (className == null) 1.382 + className = defaultORB; 1.383 + 1.384 + orb = create_impl(className); 1.385 + orb.set_parameters(app, props); 1.386 + return orb; 1.387 + } 1.388 + 1.389 + /** 1.390 + * Allows the ORB implementation to be initialized with the given 1.391 + * parameters and properties. This method, used in applications only, 1.392 + * is implemented by subclass ORB implementations and called 1.393 + * by the appropriate <code>init</code> method to pass in its parameters. 1.394 + * 1.395 + * @param args command-line arguments for the application's <code>main</code> 1.396 + * method; may be <code>null</code> 1.397 + * @param props application-specific properties; may be <code>null</code> 1.398 + */ 1.399 + abstract protected void set_parameters(String[] args, Properties props); 1.400 + 1.401 + /** 1.402 + * Allows the ORB implementation to be initialized with the given 1.403 + * applet and parameters. This method, used in applets only, 1.404 + * is implemented by subclass ORB implementations and called 1.405 + * by the appropriate <code>init</code> method to pass in its parameters. 1.406 + * 1.407 + * @param app the applet; may be <code>null</code> 1.408 + * @param props applet-specific properties; may be <code>null</code> 1.409 + */ 1.410 + abstract protected void set_parameters(Applet app, Properties props); 1.411 + 1.412 + /** 1.413 + * Connects the given servant object (a Java object that is 1.414 + * an instance of the server implementation class) 1.415 + * to the ORB. The servant class must 1.416 + * extend the <code>ImplBase</code> class corresponding to the interface that is 1.417 + * supported by the server. The servant must thus be a CORBA object 1.418 + * reference, and inherit from <code>org.omg.CORBA.Object</code>. 1.419 + * Servants created by the user can start receiving remote invocations 1.420 + * after the method <code>connect</code> has been called. A servant may also be 1.421 + * automatically and implicitly connected to the ORB if it is passed as 1.422 + * an IDL parameter in an IDL method invocation on a non-local object, 1.423 + * that is, if the servant object has to be marshalled and sent outside of the 1.424 + * process address space. 1.425 + * <P> 1.426 + * Calling the method <code>connect</code> has no effect 1.427 + * when the servant object is already connected to the ORB. 1.428 + * <P> 1.429 + * Deprecated by the OMG in favor of the Portable Object Adapter APIs. 1.430 + * 1.431 + * @param obj The servant object reference 1.432 + */ 1.433 + public void connect(org.omg.CORBA.Object obj) { 1.434 + throw new NO_IMPLEMENT(); 1.435 + } 1.436 + 1.437 + /** 1.438 + * Destroys the ORB so that its resources can be reclaimed. 1.439 + * Any operation invoked on a destroyed ORB reference will throw the 1.440 + * <code>OBJECT_NOT_EXIST</code> exception. 1.441 + * Once an ORB has been destroyed, another call to <code>init</code> 1.442 + * with the same ORBid will return a reference to a newly constructed ORB.<p> 1.443 + * If <code>destroy</code> is called on an ORB that has not been shut down, 1.444 + * it will start the shut down process and block until the ORB has shut down 1.445 + * before it destroys the ORB.<br> 1.446 + * If an application calls <code>destroy</code> in a thread that is currently servicing 1.447 + * an invocation, the <code>BAD_INV_ORDER</code> system exception will be thrown 1.448 + * with the OMG minor code 3, since blocking would result in a deadlock.<p> 1.449 + * For maximum portability and to avoid resource leaks, an application should 1.450 + * always call <code>shutdown</code> and <code>destroy</code> 1.451 + * on all ORB instances before exiting. 1.452 + * 1.453 + * @throws org.omg.CORBA.BAD_INV_ORDER if the current thread is servicing an invocation 1.454 + */ 1.455 + public void destroy( ) { 1.456 + throw new NO_IMPLEMENT(); 1.457 + } 1.458 + 1.459 + /** 1.460 + * Disconnects the given servant object from the ORB. After this method returns, 1.461 + * the ORB will reject incoming remote requests for the disconnected 1.462 + * servant and will send the exception 1.463 + * <code>org.omg.CORBA.OBJECT_NOT_EXIST</code> back to the 1.464 + * remote client. Thus the object appears to be destroyed from the 1.465 + * point of view of remote clients. Note, however, that local requests issued 1.466 + * using the servant directly do not 1.467 + * pass through the ORB; hence, they will continue to be processed by the 1.468 + * servant. 1.469 + * <P> 1.470 + * Calling the method <code>disconnect</code> has no effect 1.471 + * if the servant is not connected to the ORB. 1.472 + * <P> 1.473 + * Deprecated by the OMG in favor of the Portable Object Adapter APIs. 1.474 + * 1.475 + * @param obj The servant object to be disconnected from the ORB 1.476 + */ 1.477 + public void disconnect(org.omg.CORBA.Object obj) { 1.478 + throw new NO_IMPLEMENT(); 1.479 + } 1.480 + 1.481 + // 1.482 + // ORB method implementations. 1.483 + // 1.484 + // We are trying to accomplish 2 things at once in this class. 1.485 + // It can act as a default ORB implementation front-end, 1.486 + // creating an actual ORB implementation object which is a 1.487 + // subclass of this ORB class and then delegating the method 1.488 + // implementations. 1.489 + // 1.490 + // To accomplish the delegation model, the 'delegate' private instance 1.491 + // variable is set if an instance of this class is created directly. 1.492 + // 1.493 + 1.494 + /** 1.495 + * Returns a list of the initially available CORBA object references, 1.496 + * such as "NameService" and "InterfaceRepository". 1.497 + * 1.498 + * @return an array of <code>String</code> objects that represent 1.499 + * the object references for CORBA services 1.500 + * that are initially available with this ORB 1.501 + */ 1.502 + abstract public String[] list_initial_services(); 1.503 + 1.504 + /** 1.505 + * Resolves a specific object reference from the set of available 1.506 + * initial service names. 1.507 + * 1.508 + * @param object_name the name of the initial service as a string 1.509 + * @return the object reference associated with the given name 1.510 + * @exception InvalidName if the given name is not associated with a 1.511 + * known service 1.512 + */ 1.513 + abstract public org.omg.CORBA.Object resolve_initial_references(String object_name) 1.514 + throws InvalidName; 1.515 + 1.516 + /** 1.517 + * Converts the given CORBA object reference to a string. 1.518 + * Note that the format of this string is predefined by IIOP, allowing 1.519 + * strings generated by a different ORB to be converted back into an object 1.520 + * reference. 1.521 + * <P> 1.522 + * The resulting <code>String</code> object may be stored or communicated 1.523 + * in any way that a <code>String</code> object can be manipulated. 1.524 + * 1.525 + * @param obj the object reference to stringify 1.526 + * @return the string representing the object reference 1.527 + */ 1.528 + abstract public String object_to_string(org.omg.CORBA.Object obj); 1.529 + 1.530 + /** 1.531 + * Converts a string produced by the method <code>object_to_string</code> 1.532 + * back to a CORBA object reference. 1.533 + * 1.534 + * @param str the string to be converted back to an object reference. It must 1.535 + * be the result of converting an object reference to a string using the 1.536 + * method <code>object_to_string</code>. 1.537 + * @return the object reference 1.538 + */ 1.539 + abstract public org.omg.CORBA.Object string_to_object(String str); 1.540 + 1.541 + /** 1.542 + * Allocates an <code>NVList</code> with (probably) enough 1.543 + * space for the specified number of <code>NamedValue</code> objects. 1.544 + * Note that the specified size is only a hint to help with 1.545 + * storage allocation and does not imply the maximum size of the list. 1.546 + * 1.547 + * @param count suggested number of <code>NamedValue</code> objects for 1.548 + * which to allocate space 1.549 + * @return the newly-created <code>NVList</code> 1.550 + * 1.551 + * @see NVList 1.552 + */ 1.553 + abstract public NVList create_list(int count); 1.554 + 1.555 + /** 1.556 + * Creates an <code>NVList</code> initialized with argument 1.557 + * descriptions for the operation described in the given 1.558 + * <code>OperationDef</code> object. This <code>OperationDef</code> object 1.559 + * is obtained from an Interface Repository. The arguments in the 1.560 + * returned <code>NVList</code> object are in the same order as in the 1.561 + * original IDL operation definition, which makes it possible for the list 1.562 + * to be used in dynamic invocation requests. 1.563 + * 1.564 + * @param oper the <code>OperationDef</code> object to use to create the list 1.565 + * @return a newly-created <code>NVList</code> object containing 1.566 + * descriptions of the arguments to the method described in the given 1.567 + * <code>OperationDef</code> object 1.568 + * 1.569 + * @see NVList 1.570 + */ 1.571 + public NVList create_operation_list(org.omg.CORBA.Object oper) 1.572 + { 1.573 + // If we came here, it means that the actual ORB implementation 1.574 + // did not have a create_operation_list(...CORBA.Object oper) method, 1.575 + // so lets check if it has a create_operation_list(OperationDef oper) 1.576 + // method. 1.577 + try { 1.578 + // First try to load the OperationDef class 1.579 + String opDefClassName = "org.omg.CORBA.OperationDef"; 1.580 + Class opDefClass = null; 1.581 + 1.582 + ClassLoader cl = Thread.currentThread().getContextClassLoader(); 1.583 + if ( cl == null ) 1.584 + cl = ClassLoader.getSystemClassLoader(); 1.585 + // if this throws a ClassNotFoundException, it will be caught below. 1.586 + opDefClass = Class.forName(opDefClassName, true, cl); 1.587 + 1.588 + // OK, we loaded OperationDef. Now try to get the 1.589 + // create_operation_list(OperationDef oper) method. 1.590 + Class[] argc = { opDefClass }; 1.591 + java.lang.reflect.Method meth = 1.592 + this.getClass().getMethod("create_operation_list", argc); 1.593 + 1.594 + // OK, the method exists, so invoke it and be happy. 1.595 + Object[] argx = { oper }; 1.596 + return (org.omg.CORBA.NVList)meth.invoke(this, argx); 1.597 + } 1.598 + catch( java.lang.reflect.InvocationTargetException exs ) { 1.599 + Throwable t = exs.getTargetException(); 1.600 + if (t instanceof Error) { 1.601 + throw (Error) t; 1.602 + } 1.603 + else if (t instanceof RuntimeException) { 1.604 + throw (RuntimeException) t; 1.605 + } 1.606 + else { 1.607 + throw new org.omg.CORBA.NO_IMPLEMENT(); 1.608 + } 1.609 + } 1.610 + catch( RuntimeException ex ) { 1.611 + throw ex; 1.612 + } 1.613 + catch( Exception exr ) { 1.614 + throw new org.omg.CORBA.NO_IMPLEMENT(); 1.615 + } 1.616 + } 1.617 + 1.618 + 1.619 + /** 1.620 + * Creates a <code>NamedValue</code> object 1.621 + * using the given name, value, and argument mode flags. 1.622 + * <P> 1.623 + * A <code>NamedValue</code> object serves as (1) a parameter or return 1.624 + * value or (2) a context property. 1.625 + * It may be used by itself or 1.626 + * as an element in an <code>NVList</code> object. 1.627 + * 1.628 + * @param s the name of the <code>NamedValue</code> object 1.629 + * @param any the <code>Any</code> value to be inserted into the 1.630 + * <code>NamedValue</code> object 1.631 + * @param flags the argument mode flags for the <code>NamedValue</code>: one of 1.632 + * <code>ARG_IN.value</code>, <code>ARG_OUT.value</code>, 1.633 + * or <code>ARG_INOUT.value</code>. 1.634 + * 1.635 + * @return the newly-created <code>NamedValue</code> object 1.636 + * @see NamedValue 1.637 + */ 1.638 + abstract public NamedValue create_named_value(String s, Any any, int flags); 1.639 + 1.640 + /** 1.641 + * Creates an empty <code>ExceptionList</code> object. 1.642 + * 1.643 + * @return the newly-created <code>ExceptionList</code> object 1.644 + */ 1.645 + abstract public ExceptionList create_exception_list(); 1.646 + 1.647 + /** 1.648 + * Creates an empty <code>ContextList</code> object. 1.649 + * 1.650 + * @return the newly-created <code>ContextList</code> object 1.651 + * @see ContextList 1.652 + * @see Context 1.653 + */ 1.654 + abstract public ContextList create_context_list(); 1.655 + 1.656 + /** 1.657 + * Gets the default <code>Context</code> object. 1.658 + * 1.659 + * @return the default <code>Context</code> object 1.660 + * @see Context 1.661 + */ 1.662 + abstract public Context get_default_context(); 1.663 + 1.664 + /** 1.665 + * Creates an <code>Environment</code> object. 1.666 + * 1.667 + * @return the newly-created <code>Environment</code> object 1.668 + * @see Environment 1.669 + */ 1.670 + abstract public Environment create_environment(); 1.671 + 1.672 + /** 1.673 + * Creates a new <code>org.omg.CORBA.portable.OutputStream</code> into which 1.674 + * IDL method parameters can be marshalled during method invocation. 1.675 + * @return the newly-created 1.676 + * <code>org.omg.CORBA.portable.OutputStream</code> object 1.677 + */ 1.678 + abstract public org.omg.CORBA.portable.OutputStream create_output_stream(); 1.679 + 1.680 + /** 1.681 + * Sends multiple dynamic (DII) requests asynchronously without expecting 1.682 + * any responses. Note that oneway invocations are not guaranteed to 1.683 + * reach the server. 1.684 + * 1.685 + * @param req an array of request objects 1.686 + */ 1.687 + abstract public void send_multiple_requests_oneway(Request[] req); 1.688 + 1.689 + /** 1.690 + * Sends multiple dynamic (DII) requests asynchronously. 1.691 + * 1.692 + * @param req an array of <code>Request</code> objects 1.693 + */ 1.694 + abstract public void send_multiple_requests_deferred(Request[] req); 1.695 + 1.696 + /** 1.697 + * Finds out if any of the deferred (asynchronous) invocations have 1.698 + * a response yet. 1.699 + * @return <code>true</code> if there is a response available; 1.700 + * <code> false</code> otherwise 1.701 + */ 1.702 + abstract public boolean poll_next_response(); 1.703 + 1.704 + /** 1.705 + * Gets the next <code>Request</code> instance for which a response 1.706 + * has been received. 1.707 + * 1.708 + * @return the next <code>Request</code> object ready with a response 1.709 + * @exception WrongTransaction if the method <code>get_next_response</code> 1.710 + * is called from a transaction scope different 1.711 + * from the one from which the original request was sent. See the 1.712 + * OMG Transaction Service specification for details. 1.713 + */ 1.714 + abstract public Request get_next_response() throws WrongTransaction; 1.715 + 1.716 + /** 1.717 + * Retrieves the <code>TypeCode</code> object that represents 1.718 + * the given primitive IDL type. 1.719 + * 1.720 + * @param tcKind the <code>TCKind</code> instance corresponding to the 1.721 + * desired primitive type 1.722 + * @return the requested <code>TypeCode</code> object 1.723 + */ 1.724 + abstract public TypeCode get_primitive_tc(TCKind tcKind); 1.725 + 1.726 + /** 1.727 + * Creates a <code>TypeCode</code> object representing an IDL <code>struct</code>. 1.728 + * The <code>TypeCode</code> object is initialized with the given id, 1.729 + * name, and members. 1.730 + * 1.731 + * @param id the repository id for the <code>struct</code> 1.732 + * @param name the name of the <code>struct</code> 1.733 + * @param members an array describing the members of the <code>struct</code> 1.734 + * @return a newly-created <code>TypeCode</code> object describing 1.735 + * an IDL <code>struct</code> 1.736 + */ 1.737 + abstract public TypeCode create_struct_tc(String id, String name, 1.738 + StructMember[] members); 1.739 + 1.740 + /** 1.741 + * Creates a <code>TypeCode</code> object representing an IDL <code>union</code>. 1.742 + * The <code>TypeCode</code> object is initialized with the given id, 1.743 + * name, discriminator type, and members. 1.744 + * 1.745 + * @param id the repository id of the <code>union</code> 1.746 + * @param name the name of the <code>union</code> 1.747 + * @param discriminator_type the type of the <code>union</code> discriminator 1.748 + * @param members an array describing the members of the <code>union</code> 1.749 + * @return a newly-created <code>TypeCode</code> object describing 1.750 + * an IDL <code>union</code> 1.751 + */ 1.752 + abstract public TypeCode create_union_tc(String id, String name, 1.753 + TypeCode discriminator_type, 1.754 + UnionMember[] members); 1.755 + 1.756 + /** 1.757 + * Creates a <code>TypeCode</code> object representing an IDL <code>enum</code>. 1.758 + * The <code>TypeCode</code> object is initialized with the given id, 1.759 + * name, and members. 1.760 + * 1.761 + * @param id the repository id for the <code>enum</code> 1.762 + * @param name the name for the <code>enum</code> 1.763 + * @param members an array describing the members of the <code>enum</code> 1.764 + * @return a newly-created <code>TypeCode</code> object describing 1.765 + * an IDL <code>enum</code> 1.766 + */ 1.767 + abstract public TypeCode create_enum_tc(String id, String name, String[] members); 1.768 + 1.769 + /** 1.770 + * Creates a <code>TypeCode</code> object representing an IDL <code>alias</code> 1.771 + * (<code>typedef</code>). 1.772 + * The <code>TypeCode</code> object is initialized with the given id, 1.773 + * name, and original type. 1.774 + * 1.775 + * @param id the repository id for the alias 1.776 + * @param name the name for the alias 1.777 + * @param original_type 1.778 + * the <code>TypeCode</code> object describing the original type 1.779 + * for which this is an alias 1.780 + * @return a newly-created <code>TypeCode</code> object describing 1.781 + * an IDL <code>alias</code> 1.782 + */ 1.783 + abstract public TypeCode create_alias_tc(String id, String name, 1.784 + TypeCode original_type); 1.785 + 1.786 + /** 1.787 + * Creates a <code>TypeCode</code> object representing an IDL <code>exception</code>. 1.788 + * The <code>TypeCode</code> object is initialized with the given id, 1.789 + * name, and members. 1.790 + * 1.791 + * @param id the repository id for the <code>exception</code> 1.792 + * @param name the name for the <code>exception</code> 1.793 + * @param members an array describing the members of the <code>exception</code> 1.794 + * @return a newly-created <code>TypeCode</code> object describing 1.795 + * an IDL <code>exception</code> 1.796 + */ 1.797 + abstract public TypeCode create_exception_tc(String id, String name, 1.798 + StructMember[] members); 1.799 + 1.800 + /** 1.801 + * Creates a <code>TypeCode</code> object representing an IDL <code>interface</code>. 1.802 + * The <code>TypeCode</code> object is initialized with the given id 1.803 + * and name. 1.804 + * 1.805 + * @param id the repository id for the interface 1.806 + * @param name the name for the interface 1.807 + * @return a newly-created <code>TypeCode</code> object describing 1.808 + * an IDL <code>interface</code> 1.809 + */ 1.810 + 1.811 + abstract public TypeCode create_interface_tc(String id, String name); 1.812 + 1.813 + /** 1.814 + * Creates a <code>TypeCode</code> object representing a bounded IDL 1.815 + * <code>string</code>. 1.816 + * The <code>TypeCode</code> object is initialized with the given bound, 1.817 + * which represents the maximum length of the string. Zero indicates 1.818 + * that the string described by this type code is unbounded. 1.819 + * 1.820 + * @param bound the bound for the <code>string</code>; cannot be negative 1.821 + * @return a newly-created <code>TypeCode</code> object describing 1.822 + * a bounded IDL <code>string</code> 1.823 + * @exception BAD_PARAM if bound is a negative value 1.824 + */ 1.825 + 1.826 + abstract public TypeCode create_string_tc(int bound); 1.827 + 1.828 + /** 1.829 + * Creates a <code>TypeCode</code> object representing a bounded IDL 1.830 + * <code>wstring</code> (wide string). 1.831 + * The <code>TypeCode</code> object is initialized with the given bound, 1.832 + * which represents the maximum length of the wide string. Zero indicates 1.833 + * that the string described by this type code is unbounded. 1.834 + * 1.835 + * @param bound the bound for the <code>wstring</code>; cannot be negative 1.836 + * @return a newly-created <code>TypeCode</code> object describing 1.837 + * a bounded IDL <code>wstring</code> 1.838 + * @exception BAD_PARAM if bound is a negative value 1.839 + */ 1.840 + abstract public TypeCode create_wstring_tc(int bound); 1.841 + 1.842 + /** 1.843 + * Creates a <code>TypeCode</code> object representing an IDL <code>sequence</code>. 1.844 + * The <code>TypeCode</code> object is initialized with the given bound and 1.845 + * element type. 1.846 + * 1.847 + * @param bound the bound for the <code>sequence</code>, 0 if unbounded 1.848 + * @param element_type 1.849 + * the <code>TypeCode</code> object describing the elements 1.850 + * contained in the <code>sequence</code> 1.851 + * @return a newly-created <code>TypeCode</code> object describing 1.852 + * an IDL <code>sequence</code> 1.853 + */ 1.854 + abstract public TypeCode create_sequence_tc(int bound, TypeCode element_type); 1.855 + 1.856 + /** 1.857 + * Creates a <code>TypeCode</code> object representing a 1.858 + * a recursive IDL <code>sequence</code>. 1.859 + * <P> 1.860 + * For the IDL <code>struct</code> Node in following code fragment, 1.861 + * the offset parameter for creating its sequence would be 1: 1.862 + * <PRE> 1.863 + * Struct Node { 1.864 + * long value; 1.865 + * Sequence <Node> subnodes; 1.866 + * }; 1.867 + * </PRE> 1.868 + * 1.869 + * @param bound the bound for the sequence, 0 if unbounded 1.870 + * @param offset the index to the enclosing <code>TypeCode</code> object 1.871 + * that describes the elements of this sequence 1.872 + * @return a newly-created <code>TypeCode</code> object describing 1.873 + * a recursive sequence 1.874 + * @deprecated Use a combination of create_recursive_tc and create_sequence_tc instead 1.875 + * @see #create_recursive_tc(String) create_recursive_tc 1.876 + * @see #create_sequence_tc(int, TypeCode) create_sequence_tc 1.877 + */ 1.878 + @Deprecated 1.879 + abstract public TypeCode create_recursive_sequence_tc(int bound, int offset); 1.880 + 1.881 + /** 1.882 + * Creates a <code>TypeCode</code> object representing an IDL <code>array</code>. 1.883 + * The <code>TypeCode</code> object is initialized with the given length and 1.884 + * element type. 1.885 + * 1.886 + * @param length the length of the <code>array</code> 1.887 + * @param element_type a <code>TypeCode</code> object describing the type 1.888 + * of element contained in the <code>array</code> 1.889 + * @return a newly-created <code>TypeCode</code> object describing 1.890 + * an IDL <code>array</code> 1.891 + */ 1.892 + abstract public TypeCode create_array_tc(int length, TypeCode element_type); 1.893 + 1.894 + /** 1.895 + * Create a <code>TypeCode</code> object for an IDL native type. 1.896 + * 1.897 + * @param id the logical id for the native type. 1.898 + * @param name the name of the native type. 1.899 + * @return the requested TypeCode. 1.900 + */ 1.901 + public org.omg.CORBA.TypeCode create_native_tc(String id, 1.902 + String name) 1.903 + { 1.904 + throw new org.omg.CORBA.NO_IMPLEMENT(); 1.905 + } 1.906 + 1.907 + /** 1.908 + * Create a <code>TypeCode</code> object for an IDL abstract interface. 1.909 + * 1.910 + * @param id the logical id for the abstract interface type. 1.911 + * @param name the name of the abstract interface type. 1.912 + * @return the requested TypeCode. 1.913 + */ 1.914 + public org.omg.CORBA.TypeCode create_abstract_interface_tc( 1.915 + String id, 1.916 + String name) 1.917 + { 1.918 + throw new org.omg.CORBA.NO_IMPLEMENT(); 1.919 + } 1.920 + 1.921 + 1.922 + /** 1.923 + * Create a <code>TypeCode</code> object for an IDL fixed type. 1.924 + * 1.925 + * @param digits specifies the total number of decimal digits in the number 1.926 + * and must be from 1 to 31 inclusive. 1.927 + * @param scale specifies the position of the decimal point. 1.928 + * @return the requested TypeCode. 1.929 + */ 1.930 + public org.omg.CORBA.TypeCode create_fixed_tc(short digits, short scale) 1.931 + { 1.932 + throw new org.omg.CORBA.NO_IMPLEMENT(); 1.933 + } 1.934 + 1.935 + 1.936 + // orbos 98-01-18: Objects By Value -- begin 1.937 + 1.938 + 1.939 + /** 1.940 + * Create a <code>TypeCode</code> object for an IDL value type. 1.941 + * The concrete_base parameter is the TypeCode for the immediate 1.942 + * concrete valuetype base of the valuetype for which the TypeCode 1.943 + * is being created. 1.944 + * It may be null if the valuetype does not have a concrete base. 1.945 + * 1.946 + * @param id the logical id for the value type. 1.947 + * @param name the name of the value type. 1.948 + * @param type_modifier one of the value type modifier constants: 1.949 + * VM_NONE, VM_CUSTOM, VM_ABSTRACT or VM_TRUNCATABLE 1.950 + * @param concrete_base a <code>TypeCode</code> object 1.951 + * describing the concrete valuetype base 1.952 + * @param members an array containing the members of the value type 1.953 + * @return the requested TypeCode 1.954 + */ 1.955 + public org.omg.CORBA.TypeCode create_value_tc(String id, 1.956 + String name, 1.957 + short type_modifier, 1.958 + TypeCode concrete_base, 1.959 + ValueMember[] members) 1.960 + { 1.961 + throw new org.omg.CORBA.NO_IMPLEMENT(); 1.962 + } 1.963 + 1.964 + /** 1.965 + * Create a recursive <code>TypeCode</code> object which 1.966 + * serves as a placeholder for a concrete TypeCode during the process of creating 1.967 + * TypeCodes which contain recursion. The id parameter specifies the repository id of 1.968 + * the type for which the recursive TypeCode is serving as a placeholder. Once the 1.969 + * recursive TypeCode has been properly embedded in the enclosing TypeCode which 1.970 + * corresponds to the specified repository id, it will function as a normal TypeCode. 1.971 + * Invoking operations on the recursive TypeCode before it has been embedded in the 1.972 + * enclosing TypeCode will result in a <code>BAD_TYPECODE</code> exception. 1.973 + * <P> 1.974 + * For example, the following IDL type declaration contains recursion: 1.975 + * <PRE> 1.976 + * Struct Node { 1.977 + * Sequence<Node> subnodes; 1.978 + * }; 1.979 + * </PRE> 1.980 + * <P> 1.981 + * To create a TypeCode for struct Node, you would invoke the TypeCode creation 1.982 + * operations as shown below: 1.983 + * <PRE> 1.984 + * String nodeID = "IDL:Node:1.0"; 1.985 + * TypeCode recursiveSeqTC = orb.create_sequence_tc(0, orb.create_recursive_tc(nodeID)); 1.986 + * StructMember[] members = { new StructMember("subnodes", recursiveSeqTC, null) }; 1.987 + * TypeCode structNodeTC = orb.create_struct_tc(nodeID, "Node", members); 1.988 + * </PRE> 1.989 + * <P> 1.990 + * Also note that the following is an illegal IDL type declaration: 1.991 + * <PRE> 1.992 + * Struct Node { 1.993 + * Node next; 1.994 + * }; 1.995 + * </PRE> 1.996 + * <P> 1.997 + * Recursive types can only appear within sequences which can be empty. 1.998 + * That way marshaling problems, when transmitting the struct in an Any, are avoided. 1.999 + * <P> 1.1000 + * @param id the logical id of the referenced type 1.1001 + * @return the requested TypeCode 1.1002 + */ 1.1003 + public org.omg.CORBA.TypeCode create_recursive_tc(String id) { 1.1004 + // implemented in subclass 1.1005 + throw new org.omg.CORBA.NO_IMPLEMENT(); 1.1006 + } 1.1007 + 1.1008 + /** 1.1009 + * Creates a <code>TypeCode</code> object for an IDL value box. 1.1010 + * 1.1011 + * @param id the logical id for the value type 1.1012 + * @param name the name of the value type 1.1013 + * @param boxed_type the TypeCode for the type 1.1014 + * @return the requested TypeCode 1.1015 + */ 1.1016 + public org.omg.CORBA.TypeCode create_value_box_tc(String id, 1.1017 + String name, 1.1018 + TypeCode boxed_type) 1.1019 + { 1.1020 + // implemented in subclass 1.1021 + throw new org.omg.CORBA.NO_IMPLEMENT(); 1.1022 + } 1.1023 + 1.1024 + // orbos 98-01-18: Objects By Value -- end 1.1025 + 1.1026 + /** 1.1027 + * Creates an IDL <code>Any</code> object initialized to 1.1028 + * contain a <code>Typecode</code> object whose <code>kind</code> field 1.1029 + * is set to <code>TCKind.tc_null</code>. 1.1030 + * 1.1031 + * @return a newly-created <code>Any</code> object 1.1032 + */ 1.1033 + abstract public Any create_any(); 1.1034 + 1.1035 + 1.1036 + 1.1037 + 1.1038 + /** 1.1039 + * Retrieves a <code>Current</code> object. 1.1040 + * The <code>Current</code> interface is used to manage thread-specific 1.1041 + * information for use by services such as transactions and security. 1.1042 + * 1.1043 + * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package 1.1044 + * comments for unimplemented features</a> 1.1045 + * 1.1046 + * @return a newly-created <code>Current</code> object 1.1047 + * @deprecated use <code>resolve_initial_references</code>. 1.1048 + */ 1.1049 + @Deprecated 1.1050 + public org.omg.CORBA.Current get_current() 1.1051 + { 1.1052 + throw new org.omg.CORBA.NO_IMPLEMENT(); 1.1053 + } 1.1054 + 1.1055 + /** 1.1056 + * This operation blocks the current thread until the ORB has 1.1057 + * completed the shutdown process, initiated when some thread calls 1.1058 + * <code>shutdown</code>. It may be used by multiple threads which 1.1059 + * get all notified when the ORB shuts down. 1.1060 + * 1.1061 + */ 1.1062 + public void run() 1.1063 + { 1.1064 + throw new org.omg.CORBA.NO_IMPLEMENT(); 1.1065 + } 1.1066 + 1.1067 + /** 1.1068 + * Instructs the ORB to shut down, which causes all 1.1069 + * object adapters to shut down, in preparation for destruction.<br> 1.1070 + * If the <code>wait_for_completion</code> parameter 1.1071 + * is true, this operation blocks until all ORB processing (including 1.1072 + * processing of currently executing requests, object deactivation, 1.1073 + * and other object adapter operations) has completed. 1.1074 + * If an application does this in a thread that is currently servicing 1.1075 + * an invocation, the <code>BAD_INV_ORDER</code> system exception 1.1076 + * will be thrown with the OMG minor code 3, 1.1077 + * since blocking would result in a deadlock.<br> 1.1078 + * If the <code>wait_for_completion</code> parameter is <code>FALSE</code>, 1.1079 + * then shutdown may not have completed upon return.<p> 1.1080 + * While the ORB is in the process of shutting down, the ORB operates as normal, 1.1081 + * servicing incoming and outgoing requests until all requests have been completed. 1.1082 + * Once an ORB has shutdown, only object reference management operations 1.1083 + * may be invoked on the ORB or any object reference obtained from it. 1.1084 + * An application may also invoke the <code>destroy</code> operation on the ORB itself. 1.1085 + * Invoking any other operation will throw the <code>BAD_INV_ORDER</code> 1.1086 + * system exception with the OMG minor code 4.<p> 1.1087 + * The <code>ORB.run</code> method will return after 1.1088 + * <code>shutdown</code> has been called. 1.1089 + * 1.1090 + * @param wait_for_completion <code>true</code> if the call 1.1091 + * should block until the shutdown is complete; 1.1092 + * <code>false</code> if it should return immediately 1.1093 + * @throws org.omg.CORBA.BAD_INV_ORDER if the current thread is servicing 1.1094 + * an invocation 1.1095 + */ 1.1096 + public void shutdown(boolean wait_for_completion) 1.1097 + { 1.1098 + throw new org.omg.CORBA.NO_IMPLEMENT(); 1.1099 + } 1.1100 + 1.1101 + /** 1.1102 + * Returns <code>true</code> if the ORB needs the main thread to 1.1103 + * perform some work, and <code>false</code> if the ORB does not 1.1104 + * need the main thread. 1.1105 + * 1.1106 + * @return <code>true</code> if there is work pending, meaning that the ORB 1.1107 + * needs the main thread to perform some work; <code>false</code> 1.1108 + * if there is no work pending and thus the ORB does not need the 1.1109 + * main thread 1.1110 + * 1.1111 + */ 1.1112 + public boolean work_pending() 1.1113 + { 1.1114 + throw new org.omg.CORBA.NO_IMPLEMENT(); 1.1115 + } 1.1116 + 1.1117 + /** 1.1118 + * Performs an implementation-dependent unit of work if called 1.1119 + * by the main thread. Otherwise it does nothing. 1.1120 + * The methods <code>work_pending</code> and <code>perform_work</code> 1.1121 + * can be used in 1.1122 + * conjunction to implement a simple polling loop that multiplexes 1.1123 + * the main thread among the ORB and other activities. 1.1124 + * 1.1125 + */ 1.1126 + public void perform_work() 1.1127 + { 1.1128 + throw new org.omg.CORBA.NO_IMPLEMENT(); 1.1129 + } 1.1130 + 1.1131 + /** 1.1132 + * Used to obtain information about CORBA facilities and services 1.1133 + * that are supported by this ORB. The service type for which 1.1134 + * information is being requested is passed in as the in 1.1135 + * parameter <tt>service_type</tt>, the values defined by 1.1136 + * constants in the CORBA module. If service information is 1.1137 + * available for that type, that is returned in the out parameter 1.1138 + * <tt>service_info</tt>, and the operation returns the 1.1139 + * value <tt>true</tt>. If no information for the requested 1.1140 + * services type is available, the operation returns <tt>false</tt> 1.1141 + * (i.e., the service is not supported by this ORB). 1.1142 + * <P> 1.1143 + * @param service_type a <code>short</code> indicating the 1.1144 + * service type for which information is being requested 1.1145 + * @param service_info a <code>ServiceInformationHolder</code> object 1.1146 + * that will hold the <code>ServiceInformation</code> object 1.1147 + * produced by this method 1.1148 + * @return <code>true</code> if service information is available 1.1149 + * for the <tt>service_type</tt>; 1.1150 + * <tt>false</tt> if no information for the 1.1151 + * requested services type is available 1.1152 + * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package 1.1153 + * comments for unimplemented features</a> 1.1154 + */ 1.1155 + public boolean get_service_information(short service_type, 1.1156 + ServiceInformationHolder service_info) 1.1157 + { 1.1158 + throw new org.omg.CORBA.NO_IMPLEMENT(); 1.1159 + } 1.1160 + 1.1161 + // orbos 98-01-18: Objects By Value -- begin 1.1162 + 1.1163 + /** 1.1164 + * Creates a new <code>DynAny</code> object from the given 1.1165 + * <code>Any</code> object. 1.1166 + * <P> 1.1167 + * @param value the <code>Any</code> object from which to create a new 1.1168 + * <code>DynAny</code> object 1.1169 + * @return the new <code>DynAny</code> object created from the given 1.1170 + * <code>Any</code> object 1.1171 + * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package 1.1172 + * comments for unimplemented features</a> 1.1173 + * @deprecated Use the new <a href="../DynamicAny/DynAnyFactory.html">DynAnyFactory</a> API instead 1.1174 + */ 1.1175 + @Deprecated 1.1176 + public org.omg.CORBA.DynAny create_dyn_any(org.omg.CORBA.Any value) 1.1177 + { 1.1178 + throw new org.omg.CORBA.NO_IMPLEMENT(); 1.1179 + } 1.1180 + 1.1181 + /** 1.1182 + * Creates a basic <code>DynAny</code> object from the given 1.1183 + * <code>TypeCode</code> object. 1.1184 + * <P> 1.1185 + * @param type the <code>TypeCode</code> object from which to create a new 1.1186 + * <code>DynAny</code> object 1.1187 + * @return the new <code>DynAny</code> object created from the given 1.1188 + * <code>TypeCode</code> object 1.1189 + * @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given 1.1190 + * <code>TypeCode</code> object is not consistent with the operation. 1.1191 + * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package 1.1192 + * comments for unimplemented features</a> 1.1193 + * @deprecated Use the new <a href="../DynamicAny/DynAnyFactory.html">DynAnyFactory</a> API instead 1.1194 + */ 1.1195 + @Deprecated 1.1196 + public org.omg.CORBA.DynAny create_basic_dyn_any(org.omg.CORBA.TypeCode type) throws org.omg.CORBA.ORBPackage.InconsistentTypeCode 1.1197 + { 1.1198 + throw new org.omg.CORBA.NO_IMPLEMENT(); 1.1199 + } 1.1200 + 1.1201 + /** 1.1202 + * Creates a new <code>DynStruct</code> object from the given 1.1203 + * <code>TypeCode</code> object. 1.1204 + * <P> 1.1205 + * @param type the <code>TypeCode</code> object from which to create a new 1.1206 + * <code>DynStruct</code> object 1.1207 + * @return the new <code>DynStruct</code> object created from the given 1.1208 + * <code>TypeCode</code> object 1.1209 + * @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given 1.1210 + * <code>TypeCode</code> object is not consistent with the operation. 1.1211 + * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package 1.1212 + * comments for unimplemented features</a> 1.1213 + * @deprecated Use the new <a href="../DynamicAny/DynAnyFactory.html">DynAnyFactory</a> API instead 1.1214 + */ 1.1215 + @Deprecated 1.1216 + public org.omg.CORBA.DynStruct create_dyn_struct(org.omg.CORBA.TypeCode type) throws org.omg.CORBA.ORBPackage.InconsistentTypeCode 1.1217 + { 1.1218 + throw new org.omg.CORBA.NO_IMPLEMENT(); 1.1219 + } 1.1220 + 1.1221 + /** 1.1222 + * Creates a new <code>DynSequence</code> object from the given 1.1223 + * <code>TypeCode</code> object. 1.1224 + * <P> 1.1225 + * @param type the <code>TypeCode</code> object from which to create a new 1.1226 + * <code>DynSequence</code> object 1.1227 + * @return the new <code>DynSequence</code> object created from the given 1.1228 + * <code>TypeCode</code> object 1.1229 + * @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given 1.1230 + * <code>TypeCode</code> object is not consistent with the operation. 1.1231 + * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package 1.1232 + * comments for unimplemented features</a> 1.1233 + * @deprecated Use the new <a href="../DynamicAny/DynAnyFactory.html">DynAnyFactory</a> API instead 1.1234 + */ 1.1235 + @Deprecated 1.1236 + public org.omg.CORBA.DynSequence create_dyn_sequence(org.omg.CORBA.TypeCode type) throws org.omg.CORBA.ORBPackage.InconsistentTypeCode 1.1237 + { 1.1238 + throw new org.omg.CORBA.NO_IMPLEMENT(); 1.1239 + } 1.1240 + 1.1241 + 1.1242 + /** 1.1243 + * Creates a new <code>DynArray</code> object from the given 1.1244 + * <code>TypeCode</code> object. 1.1245 + * <P> 1.1246 + * @param type the <code>TypeCode</code> object from which to create a new 1.1247 + * <code>DynArray</code> object 1.1248 + * @return the new <code>DynArray</code> object created from the given 1.1249 + * <code>TypeCode</code> object 1.1250 + * @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given 1.1251 + * <code>TypeCode</code> object is not consistent with the operation. 1.1252 + * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package 1.1253 + * comments for unimplemented features</a> 1.1254 + * @deprecated Use the new <a href="../DynamicAny/DynAnyFactory.html">DynAnyFactory</a> API instead 1.1255 + */ 1.1256 + @Deprecated 1.1257 + public org.omg.CORBA.DynArray create_dyn_array(org.omg.CORBA.TypeCode type) throws org.omg.CORBA.ORBPackage.InconsistentTypeCode 1.1258 + { 1.1259 + throw new org.omg.CORBA.NO_IMPLEMENT(); 1.1260 + } 1.1261 + 1.1262 + /** 1.1263 + * Creates a new <code>DynUnion</code> object from the given 1.1264 + * <code>TypeCode</code> object. 1.1265 + * <P> 1.1266 + * @param type the <code>TypeCode</code> object from which to create a new 1.1267 + * <code>DynUnion</code> object 1.1268 + * @return the new <code>DynUnion</code> object created from the given 1.1269 + * <code>TypeCode</code> object 1.1270 + * @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given 1.1271 + * <code>TypeCode</code> object is not consistent with the operation. 1.1272 + * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package 1.1273 + * comments for unimplemented features</a> 1.1274 + * @deprecated Use the new <a href="../DynamicAny/DynAnyFactory.html">DynAnyFactory</a> API instead 1.1275 + */ 1.1276 + @Deprecated 1.1277 + public org.omg.CORBA.DynUnion create_dyn_union(org.omg.CORBA.TypeCode type) throws org.omg.CORBA.ORBPackage.InconsistentTypeCode 1.1278 + { 1.1279 + throw new org.omg.CORBA.NO_IMPLEMENT(); 1.1280 + } 1.1281 + 1.1282 + /** 1.1283 + * Creates a new <code>DynEnum</code> object from the given 1.1284 + * <code>TypeCode</code> object. 1.1285 + * <P> 1.1286 + * @param type the <code>TypeCode</code> object from which to create a new 1.1287 + * <code>DynEnum</code> object 1.1288 + * @return the new <code>DynEnum</code> object created from the given 1.1289 + * <code>TypeCode</code> object 1.1290 + * @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given 1.1291 + * <code>TypeCode</code> object is not consistent with the operation. 1.1292 + * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package 1.1293 + * comments for unimplemented features</a> 1.1294 + * @deprecated Use the new <a href="../DynamicAny/DynAnyFactory.html">DynAnyFactory</a> API instead 1.1295 + */ 1.1296 + @Deprecated 1.1297 + public org.omg.CORBA.DynEnum create_dyn_enum(org.omg.CORBA.TypeCode type) throws org.omg.CORBA.ORBPackage.InconsistentTypeCode 1.1298 + { 1.1299 + throw new org.omg.CORBA.NO_IMPLEMENT(); 1.1300 + } 1.1301 + 1.1302 + /** 1.1303 + * Can be invoked to create new instances of policy objects 1.1304 + * of a specific type with specified initial state. If 1.1305 + * <tt>create_policy</tt> fails to instantiate a new Policy 1.1306 + * object due to its inability to interpret the requested type 1.1307 + * and content of the policy, it raises the <tt>PolicyError</tt> 1.1308 + * exception with the appropriate reason. 1.1309 + * @param type the <tt>PolicyType</tt> of the policy object to 1.1310 + * be created 1.1311 + * @param val the value that will be used to set the initial 1.1312 + * state of the <tt>Policy</tt> object that is created 1.1313 + * @return Reference to a newly created <tt>Policy</tt> object 1.1314 + * of type specified by the <tt>type</tt> parameter and 1.1315 + * initialized to a state specified by the <tt>val</tt> 1.1316 + * parameter 1.1317 + * @throws <tt>org.omg.CORBA.PolicyError</tt> when the requested 1.1318 + * policy is not supported or a requested initial state 1.1319 + * for the policy is not supported. 1.1320 + */ 1.1321 + public org.omg.CORBA.Policy create_policy(int type, org.omg.CORBA.Any val) 1.1322 + throws org.omg.CORBA.PolicyError 1.1323 + { 1.1324 + // Currently not implemented until PIORB. 1.1325 + throw new org.omg.CORBA.NO_IMPLEMENT(); 1.1326 + } 1.1327 +}