aoqi@0: /* aoqi@0: * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved. aoqi@0: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. aoqi@0: * aoqi@0: * This code is free software; you can redistribute it and/or modify it aoqi@0: * under the terms of the GNU General Public License version 2 only, as aoqi@0: * published by the Free Software Foundation. Oracle designates this aoqi@0: * particular file as subject to the "Classpath" exception as provided aoqi@0: * by Oracle in the LICENSE file that accompanied this code. aoqi@0: * aoqi@0: * This code is distributed in the hope that it will be useful, but WITHOUT aoqi@0: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or aoqi@0: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License aoqi@0: * version 2 for more details (a copy is included in the LICENSE file that aoqi@0: * accompanied this code). aoqi@0: * aoqi@0: * You should have received a copy of the GNU General Public License version aoqi@0: * 2 along with this work; if not, write to the Free Software Foundation, aoqi@0: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. aoqi@0: * aoqi@0: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA aoqi@0: * or visit www.oracle.com if you need additional information or have any aoqi@0: * questions. aoqi@0: */ aoqi@0: aoqi@0: package org.omg.CORBA; aoqi@0: aoqi@0: import org.omg.CORBA.portable.*; aoqi@0: import org.omg.CORBA.ORBPackage.InvalidName; aoqi@0: aoqi@0: import java.util.Properties; aoqi@0: import java.applet.Applet; aoqi@0: import java.io.File; aoqi@0: import java.io.FileInputStream; aoqi@0: aoqi@0: import java.security.AccessController; aoqi@0: import java.security.PrivilegedAction; aoqi@0: aoqi@0: import sun.reflect.misc.ReflectUtil; aoqi@0: aoqi@0: /** aoqi@0: * A class providing APIs for the CORBA Object Request Broker aoqi@0: * features. The ORB class also provides aoqi@0: * "pluggable ORB implementation" APIs that allow another vendor's ORB aoqi@0: * implementation to be used. aoqi@0: *

aoqi@0: * An ORB makes it possible for CORBA objects to communicate aoqi@0: * with each other by connecting objects making requests (clients) with aoqi@0: * objects servicing requests (servers). aoqi@0: *

aoqi@0: * aoqi@0: * The ORB class, which aoqi@0: * encapsulates generic CORBA functionality, does the following: aoqi@0: * (Note that items 5 and 6, which include most of the methods in aoqi@0: * the class ORB, are typically used with the Dynamic Invocation aoqi@0: * Interface (DII) and the Dynamic Skeleton Interface aoqi@0: * (DSI). aoqi@0: * These interfaces may be used by a developer directly, but aoqi@0: * most commonly they are used by the ORB internally and are aoqi@0: * not seen by the general programmer.) aoqi@0: *

    aoqi@0: *
  1. initializes the ORB implementation by supplying values for aoqi@0: * predefined properties and environmental parameters aoqi@0: *
  2. obtains initial object references to services such as aoqi@0: * the NameService using the method resolve_initial_references aoqi@0: *
  3. converts object references to strings and back aoqi@0: *
  4. connects the ORB to a servant (an instance of a CORBA object aoqi@0: * implementation) and disconnects the ORB from a servant aoqi@0: *
  5. creates objects such as aoqi@0: * aoqi@0: *
  6. sends multiple messages in the DII aoqi@0: *
aoqi@0: * aoqi@0: *

aoqi@0: * The ORB class can be used to obtain references to objects aoqi@0: * implemented anywhere on the network. aoqi@0: *

aoqi@0: * An application or applet gains access to the CORBA environment aoqi@0: * by initializing itself into an ORB using one of aoqi@0: * three init methods. Two of the three methods use the properties aoqi@0: * (associations of a name with a value) shown in the aoqi@0: * table below.
aoqi@0: * aoqi@0: * aoqi@0: * aoqi@0: * aoqi@0: * aoqi@0: * aoqi@0: * aoqi@0: *
Property Name Property Value
Standard Java CORBA Properties:
org.omg.CORBA.ORBClassclass name of an ORB implementation
org.omg.CORBA.ORBSingletonClassclass name of the ORB returned by init()
aoqi@0: *

aoqi@0: * These properties allow a different vendor's ORB aoqi@0: * implementation to be "plugged in." aoqi@0: *

aoqi@0: * When an ORB instance is being created, the class name of the ORB aoqi@0: * implementation is located using aoqi@0: * the following standard search order:

aoqi@0: * aoqi@0: *

    aoqi@0: *
  1. check in Applet parameter or application string array, if any aoqi@0: * aoqi@0: *
  2. check in properties parameter, if any aoqi@0: * aoqi@0: *
  3. check in the System properties aoqi@0: * aoqi@0: *
  4. check in the orb.properties file located in the user.home aoqi@0: * directory (if any) aoqi@0: * aoqi@0: *
  5. check in the orb.properties file located in the java.home/lib aoqi@0: * directory (if any) aoqi@0: * aoqi@0: *
  6. fall back on a hardcoded default behavior (use the Java IDL aoqi@0: * implementation) aoqi@0: *
aoqi@0: *

aoqi@0: * Note that Java IDL provides a default implementation for the aoqi@0: * fully-functional ORB and for the Singleton ORB. When the method aoqi@0: * init is given no parameters, the default Singleton aoqi@0: * ORB is returned. When the method init is given parameters aoqi@0: * but no ORB class is specified, the Java IDL ORB implementation aoqi@0: * is returned. aoqi@0: *

aoqi@0: * The following code fragment creates an ORB object aoqi@0: * initialized with the default ORB Singleton. aoqi@0: * This ORB has a aoqi@0: * restricted implementation to prevent malicious applets from doing aoqi@0: * anything beyond creating typecodes. aoqi@0: * It is called a singleton aoqi@0: * because there is only one instance for an entire virtual machine. aoqi@0: *

aoqi@0:  *    ORB orb = ORB.init();
aoqi@0:  * 
aoqi@0: *

aoqi@0: * The following code fragment creates an ORB object aoqi@0: * for an application. The parameter args aoqi@0: * represents the arguments supplied to the application's main aoqi@0: * method. Since the property specifies the ORB class to be aoqi@0: * "SomeORBImplementation", the new ORB will be initialized with aoqi@0: * that ORB implementation. If p had been null, aoqi@0: * and the arguments had not specified an ORB class, aoqi@0: * the new ORB would have been aoqi@0: * initialized with the default Java IDL implementation. aoqi@0: *

aoqi@0:  *    Properties p = new Properties();
aoqi@0:  *    p.put("org.omg.CORBA.ORBClass", "SomeORBImplementation");
aoqi@0:  *    ORB orb = ORB.init(args, p);
aoqi@0:  * 
aoqi@0: *

aoqi@0: * The following code fragment creates an ORB object aoqi@0: * for the applet supplied as the first parameter. If the given aoqi@0: * applet does not specify an ORB class, the new ORB will be aoqi@0: * initialized with the default Java IDL implementation. aoqi@0: *

aoqi@0:  *    ORB orb = ORB.init(myApplet, null);
aoqi@0:  * 
aoqi@0: *

aoqi@0: * An application or applet can be initialized in one or more ORBs. aoqi@0: * ORB initialization is a bootstrap call into the CORBA world. aoqi@0: * @since JDK1.2 aoqi@0: */ aoqi@0: abstract public class ORB { aoqi@0: aoqi@0: // aoqi@0: // This is the ORB implementation used when nothing else is specified. aoqi@0: // Whoever provides this class customizes this string to aoqi@0: // point at their ORB implementation. aoqi@0: // aoqi@0: private static final String ORBClassKey = "org.omg.CORBA.ORBClass"; aoqi@0: private static final String ORBSingletonClassKey = "org.omg.CORBA.ORBSingletonClass"; aoqi@0: aoqi@0: // aoqi@0: // The global instance of the singleton ORB implementation which aoqi@0: // acts as a factory for typecodes for generated Helper classes. aoqi@0: // TypeCodes should be immutable since they may be shared across aoqi@0: // different security contexts (applets). There should be no way to aoqi@0: // use a TypeCode as a storage depot for illicitly passing aoqi@0: // information or Java objects between different security contexts. aoqi@0: // aoqi@0: static private ORB singleton; aoqi@0: aoqi@0: // Get System property aoqi@0: private static String getSystemProperty(final String name) { aoqi@0: aoqi@0: // This will not throw a SecurityException because this aoqi@0: // class was loaded from rt.jar using the bootstrap classloader. aoqi@0: String propValue = (String) AccessController.doPrivileged( aoqi@0: new PrivilegedAction() { aoqi@0: public java.lang.Object run() { aoqi@0: return System.getProperty(name); aoqi@0: } aoqi@0: } aoqi@0: ); aoqi@0: aoqi@0: return propValue; aoqi@0: } aoqi@0: aoqi@0: // Get property from orb.properties in either or /lib aoqi@0: // directories. aoqi@0: private static String getPropertyFromFile(final String name) { aoqi@0: // This will not throw a SecurityException because this aoqi@0: // class was loaded from rt.jar using the bootstrap classloader. aoqi@0: aoqi@0: String propValue = (String) AccessController.doPrivileged( aoqi@0: new PrivilegedAction() { aoqi@0: private Properties getFileProperties( String fileName ) { aoqi@0: try { aoqi@0: File propFile = new File( fileName ) ; aoqi@0: if (!propFile.exists()) aoqi@0: return null ; aoqi@0: aoqi@0: Properties props = new Properties() ; aoqi@0: FileInputStream fis = new FileInputStream(propFile); aoqi@0: try { aoqi@0: props.load( fis ); aoqi@0: } finally { aoqi@0: fis.close() ; aoqi@0: } aoqi@0: aoqi@0: return props ; aoqi@0: } catch (Exception exc) { aoqi@0: return null ; aoqi@0: } aoqi@0: } aoqi@0: aoqi@0: public java.lang.Object run() { aoqi@0: String userHome = System.getProperty("user.home"); aoqi@0: String fileName = userHome + File.separator + aoqi@0: "orb.properties" ; aoqi@0: Properties props = getFileProperties( fileName ) ; aoqi@0: aoqi@0: if (props != null) { aoqi@0: String value = props.getProperty( name ) ; aoqi@0: if (value != null) aoqi@0: return value ; aoqi@0: } aoqi@0: aoqi@0: String javaHome = System.getProperty("java.home"); aoqi@0: fileName = javaHome + File.separator aoqi@0: + "lib" + File.separator + "orb.properties"; aoqi@0: props = getFileProperties( fileName ) ; aoqi@0: aoqi@0: if (props == null) aoqi@0: return null ; aoqi@0: else aoqi@0: return props.getProperty( name ) ; aoqi@0: } aoqi@0: } aoqi@0: ); aoqi@0: aoqi@0: return propValue; aoqi@0: } aoqi@0: aoqi@0: /** aoqi@0: * Returns the ORB singleton object. This method always returns the aoqi@0: * same ORB instance, which is an instance of the class described by the aoqi@0: * org.omg.CORBA.ORBSingletonClass system property. aoqi@0: *

aoqi@0: * This no-argument version of the method init is used primarily aoqi@0: * as a factory for TypeCode objects, which are used by aoqi@0: * Helper classes to implement the method type. aoqi@0: * It is also used to create Any objects that are used to aoqi@0: * describe union labels (as part of creating a aoqi@0: * TypeCode object for a union). aoqi@0: *

aoqi@0: * This method is not intended to be used by applets, and in the event aoqi@0: * that it is called in an applet environment, the ORB it returns aoqi@0: * is restricted so that it can be used only as a factory for aoqi@0: * TypeCode objects. Any TypeCode objects aoqi@0: * it produces can be safely shared among untrusted applets. aoqi@0: *

aoqi@0: * If an ORB is created using this method from an applet, aoqi@0: * a system exception will be thrown if aoqi@0: * methods other than those for aoqi@0: * creating TypeCode objects are invoked. aoqi@0: * aoqi@0: * @return the singleton ORB aoqi@0: */ aoqi@0: public static synchronized ORB init() { aoqi@0: if (singleton == null) { aoqi@0: String className = getSystemProperty(ORBSingletonClassKey); aoqi@0: if (className == null) aoqi@0: className = getPropertyFromFile(ORBSingletonClassKey); aoqi@0: if ((className == null) || aoqi@0: (className.equals("com.sun.corba.se.impl.orb.ORBSingleton"))) { aoqi@0: singleton = new com.sun.corba.se.impl.orb.ORBSingleton(); aoqi@0: } else { aoqi@0: singleton = create_impl(className); aoqi@0: } aoqi@0: } aoqi@0: return singleton; aoqi@0: } aoqi@0: aoqi@0: private static ORB create_impl(String className) { aoqi@0: ClassLoader cl = Thread.currentThread().getContextClassLoader(); aoqi@0: if (cl == null) aoqi@0: cl = ClassLoader.getSystemClassLoader(); aoqi@0: aoqi@0: try { aoqi@0: ReflectUtil.checkPackageAccess(className); aoqi@0: Class orbBaseClass = org.omg.CORBA.ORB.class; aoqi@0: Class orbClass = Class.forName(className, true, cl).asSubclass(orbBaseClass); aoqi@0: return (ORB)orbClass.newInstance(); aoqi@0: } catch (Throwable ex) { aoqi@0: SystemException systemException = new INITIALIZE( aoqi@0: "can't instantiate default ORB implementation " + className); aoqi@0: systemException.initCause(ex); aoqi@0: throw systemException; aoqi@0: } aoqi@0: } aoqi@0: aoqi@0: /** aoqi@0: * Creates a new ORB instance for a standalone aoqi@0: * application. This method may be called from applications aoqi@0: * only and returns a new fully functional ORB object aoqi@0: * each time it is called. aoqi@0: * @param args command-line arguments for the application's main aoqi@0: * method; may be null aoqi@0: * @param props application-specific properties; may be null aoqi@0: * @return the newly-created ORB instance aoqi@0: */ aoqi@0: public static ORB init(String[] args, Properties props) { aoqi@0: // aoqi@0: // Note that there is no standard command-line argument for aoqi@0: // specifying the default ORB implementation. For an aoqi@0: // application you can choose an implementation either by aoqi@0: // setting the CLASSPATH to pick a different org.omg.CORBA aoqi@0: // and it's baked-in ORB implementation default or by aoqi@0: // setting an entry in the properties object or in the aoqi@0: // system properties. aoqi@0: // aoqi@0: String className = null; aoqi@0: ORB orb; aoqi@0: aoqi@0: if (props != null) aoqi@0: className = props.getProperty(ORBClassKey); aoqi@0: if (className == null) aoqi@0: className = getSystemProperty(ORBClassKey); aoqi@0: if (className == null) aoqi@0: className = getPropertyFromFile(ORBClassKey); aoqi@0: if ((className == null) || aoqi@0: (className.equals("com.sun.corba.se.impl.orb.ORBImpl"))) { aoqi@0: orb = new com.sun.corba.se.impl.orb.ORBImpl(); aoqi@0: } else { aoqi@0: orb = create_impl(className); aoqi@0: } aoqi@0: orb.set_parameters(args, props); aoqi@0: return orb; aoqi@0: } aoqi@0: aoqi@0: aoqi@0: /** aoqi@0: * Creates a new ORB instance for an applet. This aoqi@0: * method may be called from applets only and returns a new aoqi@0: * fully-functional ORB object each time it is called. aoqi@0: * @param app the applet; may be null aoqi@0: * @param props applet-specific properties; may be null aoqi@0: * @return the newly-created ORB instance aoqi@0: */ aoqi@0: public static ORB init(Applet app, Properties props) { aoqi@0: String className; aoqi@0: ORB orb; aoqi@0: aoqi@0: className = app.getParameter(ORBClassKey); aoqi@0: if (className == null && props != null) aoqi@0: className = props.getProperty(ORBClassKey); aoqi@0: if (className == null) aoqi@0: className = getSystemProperty(ORBClassKey); aoqi@0: if (className == null) aoqi@0: className = getPropertyFromFile(ORBClassKey); aoqi@0: if ((className == null) || aoqi@0: (className.equals("com.sun.corba.se.impl.orb.ORBImpl"))) { aoqi@0: orb = new com.sun.corba.se.impl.orb.ORBImpl(); aoqi@0: } else { aoqi@0: orb = create_impl(className); aoqi@0: } aoqi@0: orb.set_parameters(app, props); aoqi@0: return orb; aoqi@0: } aoqi@0: aoqi@0: /** aoqi@0: * Allows the ORB implementation to be initialized with the given aoqi@0: * parameters and properties. This method, used in applications only, aoqi@0: * is implemented by subclass ORB implementations and called aoqi@0: * by the appropriate init method to pass in its parameters. aoqi@0: * aoqi@0: * @param args command-line arguments for the application's main aoqi@0: * method; may be null aoqi@0: * @param props application-specific properties; may be null aoqi@0: */ aoqi@0: abstract protected void set_parameters(String[] args, Properties props); aoqi@0: aoqi@0: /** aoqi@0: * Allows the ORB implementation to be initialized with the given aoqi@0: * applet and parameters. This method, used in applets only, aoqi@0: * is implemented by subclass ORB implementations and called aoqi@0: * by the appropriate init method to pass in its parameters. aoqi@0: * aoqi@0: * @param app the applet; may be null aoqi@0: * @param props applet-specific properties; may be null aoqi@0: */ aoqi@0: abstract protected void set_parameters(Applet app, Properties props); aoqi@0: aoqi@0: /** aoqi@0: * Connects the given servant object (a Java object that is aoqi@0: * an instance of the server implementation class) aoqi@0: * to the ORB. The servant class must aoqi@0: * extend the ImplBase class corresponding to the interface that is aoqi@0: * supported by the server. The servant must thus be a CORBA object aoqi@0: * reference, and inherit from org.omg.CORBA.Object. aoqi@0: * Servants created by the user can start receiving remote invocations aoqi@0: * after the method connect has been called. A servant may also be aoqi@0: * automatically and implicitly connected to the ORB if it is passed as aoqi@0: * an IDL parameter in an IDL method invocation on a non-local object, aoqi@0: * that is, if the servant object has to be marshalled and sent outside of the aoqi@0: * process address space. aoqi@0: *

aoqi@0: * Calling the method connect has no effect aoqi@0: * when the servant object is already connected to the ORB. aoqi@0: *

aoqi@0: * Deprecated by the OMG in favor of the Portable Object Adapter APIs. aoqi@0: * aoqi@0: * @param obj The servant object reference aoqi@0: */ aoqi@0: public void connect(org.omg.CORBA.Object obj) { aoqi@0: throw new NO_IMPLEMENT(); aoqi@0: } aoqi@0: aoqi@0: /** aoqi@0: * Destroys the ORB so that its resources can be reclaimed. aoqi@0: * Any operation invoked on a destroyed ORB reference will throw the aoqi@0: * OBJECT_NOT_EXIST exception. aoqi@0: * Once an ORB has been destroyed, another call to init aoqi@0: * with the same ORBid will return a reference to a newly constructed ORB.

aoqi@0: * If destroy is called on an ORB that has not been shut down, aoqi@0: * it will start the shut down process and block until the ORB has shut down aoqi@0: * before it destroys the ORB.
aoqi@0: * If an application calls destroy in a thread that is currently servicing aoqi@0: * an invocation, the BAD_INV_ORDER system exception will be thrown aoqi@0: * with the OMG minor code 3, since blocking would result in a deadlock.

aoqi@0: * For maximum portability and to avoid resource leaks, an application should aoqi@0: * always call shutdown and destroy aoqi@0: * on all ORB instances before exiting. aoqi@0: * aoqi@0: * @throws org.omg.CORBA.BAD_INV_ORDER if the current thread is servicing an invocation aoqi@0: */ aoqi@0: public void destroy( ) { aoqi@0: throw new NO_IMPLEMENT(); aoqi@0: } aoqi@0: aoqi@0: /** aoqi@0: * Disconnects the given servant object from the ORB. After this method returns, aoqi@0: * the ORB will reject incoming remote requests for the disconnected aoqi@0: * servant and will send the exception aoqi@0: * org.omg.CORBA.OBJECT_NOT_EXIST back to the aoqi@0: * remote client. Thus the object appears to be destroyed from the aoqi@0: * point of view of remote clients. Note, however, that local requests issued aoqi@0: * using the servant directly do not aoqi@0: * pass through the ORB; hence, they will continue to be processed by the aoqi@0: * servant. aoqi@0: *

aoqi@0: * Calling the method disconnect has no effect aoqi@0: * if the servant is not connected to the ORB. aoqi@0: *

aoqi@0: * Deprecated by the OMG in favor of the Portable Object Adapter APIs. aoqi@0: * aoqi@0: * @param obj The servant object to be disconnected from the ORB aoqi@0: */ aoqi@0: public void disconnect(org.omg.CORBA.Object obj) { aoqi@0: throw new NO_IMPLEMENT(); aoqi@0: } aoqi@0: aoqi@0: // aoqi@0: // ORB method implementations. aoqi@0: // aoqi@0: // We are trying to accomplish 2 things at once in this class. aoqi@0: // It can act as a default ORB implementation front-end, aoqi@0: // creating an actual ORB implementation object which is a aoqi@0: // subclass of this ORB class and then delegating the method aoqi@0: // implementations. aoqi@0: // aoqi@0: // To accomplish the delegation model, the 'delegate' private instance aoqi@0: // variable is set if an instance of this class is created directly. aoqi@0: // aoqi@0: aoqi@0: /** aoqi@0: * Returns a list of the initially available CORBA object references, aoqi@0: * such as "NameService" and "InterfaceRepository". aoqi@0: * aoqi@0: * @return an array of String objects that represent aoqi@0: * the object references for CORBA services aoqi@0: * that are initially available with this ORB aoqi@0: */ aoqi@0: abstract public String[] list_initial_services(); aoqi@0: aoqi@0: /** aoqi@0: * Resolves a specific object reference from the set of available aoqi@0: * initial service names. aoqi@0: * aoqi@0: * @param object_name the name of the initial service as a string aoqi@0: * @return the object reference associated with the given name aoqi@0: * @exception InvalidName if the given name is not associated with a aoqi@0: * known service aoqi@0: */ aoqi@0: abstract public org.omg.CORBA.Object resolve_initial_references(String object_name) aoqi@0: throws InvalidName; aoqi@0: aoqi@0: /** aoqi@0: * Converts the given CORBA object reference to a string. aoqi@0: * Note that the format of this string is predefined by IIOP, allowing aoqi@0: * strings generated by a different ORB to be converted back into an object aoqi@0: * reference. aoqi@0: *

aoqi@0: * The resulting String object may be stored or communicated aoqi@0: * in any way that a String object can be manipulated. aoqi@0: * aoqi@0: * @param obj the object reference to stringify aoqi@0: * @return the string representing the object reference aoqi@0: */ aoqi@0: abstract public String object_to_string(org.omg.CORBA.Object obj); aoqi@0: aoqi@0: /** aoqi@0: * Converts a string produced by the method object_to_string aoqi@0: * back to a CORBA object reference. aoqi@0: * aoqi@0: * @param str the string to be converted back to an object reference. It must aoqi@0: * be the result of converting an object reference to a string using the aoqi@0: * method object_to_string. aoqi@0: * @return the object reference aoqi@0: */ aoqi@0: abstract public org.omg.CORBA.Object string_to_object(String str); aoqi@0: aoqi@0: /** aoqi@0: * Allocates an NVList with (probably) enough aoqi@0: * space for the specified number of NamedValue objects. aoqi@0: * Note that the specified size is only a hint to help with aoqi@0: * storage allocation and does not imply the maximum size of the list. aoqi@0: * aoqi@0: * @param count suggested number of NamedValue objects for aoqi@0: * which to allocate space aoqi@0: * @return the newly-created NVList aoqi@0: * aoqi@0: * @see NVList aoqi@0: */ aoqi@0: abstract public NVList create_list(int count); aoqi@0: aoqi@0: /** aoqi@0: * Creates an NVList initialized with argument aoqi@0: * descriptions for the operation described in the given aoqi@0: * OperationDef object. This OperationDef object aoqi@0: * is obtained from an Interface Repository. The arguments in the aoqi@0: * returned NVList object are in the same order as in the aoqi@0: * original IDL operation definition, which makes it possible for the list aoqi@0: * to be used in dynamic invocation requests. aoqi@0: * aoqi@0: * @param oper the OperationDef object to use to create the list aoqi@0: * @return a newly-created NVList object containing aoqi@0: * descriptions of the arguments to the method described in the given aoqi@0: * OperationDef object aoqi@0: * aoqi@0: * @see NVList aoqi@0: */ aoqi@0: public NVList create_operation_list(org.omg.CORBA.Object oper) aoqi@0: { aoqi@0: // If we came here, it means that the actual ORB implementation aoqi@0: // did not have a create_operation_list(...CORBA.Object oper) method, aoqi@0: // so lets check if it has a create_operation_list(OperationDef oper) aoqi@0: // method. aoqi@0: try { aoqi@0: // First try to load the OperationDef class aoqi@0: String opDefClassName = "org.omg.CORBA.OperationDef"; aoqi@0: Class opDefClass = null; aoqi@0: aoqi@0: ClassLoader cl = Thread.currentThread().getContextClassLoader(); aoqi@0: if ( cl == null ) aoqi@0: cl = ClassLoader.getSystemClassLoader(); aoqi@0: // if this throws a ClassNotFoundException, it will be caught below. aoqi@0: opDefClass = Class.forName(opDefClassName, true, cl); aoqi@0: aoqi@0: // OK, we loaded OperationDef. Now try to get the aoqi@0: // create_operation_list(OperationDef oper) method. aoqi@0: Class[] argc = { opDefClass }; aoqi@0: java.lang.reflect.Method meth = aoqi@0: this.getClass().getMethod("create_operation_list", argc); aoqi@0: aoqi@0: // OK, the method exists, so invoke it and be happy. aoqi@0: java.lang.Object[] argx = { oper }; aoqi@0: return (org.omg.CORBA.NVList)meth.invoke(this, argx); aoqi@0: } aoqi@0: catch( java.lang.reflect.InvocationTargetException exs ) { aoqi@0: Throwable t = exs.getTargetException(); aoqi@0: if (t instanceof Error) { aoqi@0: throw (Error) t; aoqi@0: } aoqi@0: else if (t instanceof RuntimeException) { aoqi@0: throw (RuntimeException) t; aoqi@0: } aoqi@0: else { aoqi@0: throw new org.omg.CORBA.NO_IMPLEMENT(); aoqi@0: } aoqi@0: } aoqi@0: catch( RuntimeException ex ) { aoqi@0: throw ex; aoqi@0: } aoqi@0: catch( Exception exr ) { aoqi@0: throw new org.omg.CORBA.NO_IMPLEMENT(); aoqi@0: } aoqi@0: } aoqi@0: aoqi@0: aoqi@0: /** aoqi@0: * Creates a NamedValue object aoqi@0: * using the given name, value, and argument mode flags. aoqi@0: *

aoqi@0: * A NamedValue object serves as (1) a parameter or return aoqi@0: * value or (2) a context property. aoqi@0: * It may be used by itself or aoqi@0: * as an element in an NVList object. aoqi@0: * aoqi@0: * @param s the name of the NamedValue object aoqi@0: * @param any the Any value to be inserted into the aoqi@0: * NamedValue object aoqi@0: * @param flags the argument mode flags for the NamedValue: one of aoqi@0: * ARG_IN.value, ARG_OUT.value, aoqi@0: * or ARG_INOUT.value. aoqi@0: * aoqi@0: * @return the newly-created NamedValue object aoqi@0: * @see NamedValue aoqi@0: */ aoqi@0: abstract public NamedValue create_named_value(String s, Any any, int flags); aoqi@0: aoqi@0: /** aoqi@0: * Creates an empty ExceptionList object. aoqi@0: * aoqi@0: * @return the newly-created ExceptionList object aoqi@0: */ aoqi@0: abstract public ExceptionList create_exception_list(); aoqi@0: aoqi@0: /** aoqi@0: * Creates an empty ContextList object. aoqi@0: * aoqi@0: * @return the newly-created ContextList object aoqi@0: * @see ContextList aoqi@0: * @see Context aoqi@0: */ aoqi@0: abstract public ContextList create_context_list(); aoqi@0: aoqi@0: /** aoqi@0: * Gets the default Context object. aoqi@0: * aoqi@0: * @return the default Context object aoqi@0: * @see Context aoqi@0: */ aoqi@0: abstract public Context get_default_context(); aoqi@0: aoqi@0: /** aoqi@0: * Creates an Environment object. aoqi@0: * aoqi@0: * @return the newly-created Environment object aoqi@0: * @see Environment aoqi@0: */ aoqi@0: abstract public Environment create_environment(); aoqi@0: aoqi@0: /** aoqi@0: * Creates a new org.omg.CORBA.portable.OutputStream into which aoqi@0: * IDL method parameters can be marshalled during method invocation. aoqi@0: * @return the newly-created aoqi@0: * org.omg.CORBA.portable.OutputStream object aoqi@0: */ aoqi@0: abstract public org.omg.CORBA.portable.OutputStream create_output_stream(); aoqi@0: aoqi@0: /** aoqi@0: * Sends multiple dynamic (DII) requests asynchronously without expecting aoqi@0: * any responses. Note that oneway invocations are not guaranteed to aoqi@0: * reach the server. aoqi@0: * aoqi@0: * @param req an array of request objects aoqi@0: */ aoqi@0: abstract public void send_multiple_requests_oneway(Request[] req); aoqi@0: aoqi@0: /** aoqi@0: * Sends multiple dynamic (DII) requests asynchronously. aoqi@0: * aoqi@0: * @param req an array of Request objects aoqi@0: */ aoqi@0: abstract public void send_multiple_requests_deferred(Request[] req); aoqi@0: aoqi@0: /** aoqi@0: * Finds out if any of the deferred (asynchronous) invocations have aoqi@0: * a response yet. aoqi@0: * @return true if there is a response available; aoqi@0: * false otherwise aoqi@0: */ aoqi@0: abstract public boolean poll_next_response(); aoqi@0: aoqi@0: /** aoqi@0: * Gets the next Request instance for which a response aoqi@0: * has been received. aoqi@0: * aoqi@0: * @return the next Request object ready with a response aoqi@0: * @exception WrongTransaction if the method get_next_response aoqi@0: * is called from a transaction scope different aoqi@0: * from the one from which the original request was sent. See the aoqi@0: * OMG Transaction Service specification for details. aoqi@0: */ aoqi@0: abstract public Request get_next_response() throws WrongTransaction; aoqi@0: aoqi@0: /** aoqi@0: * Retrieves the TypeCode object that represents aoqi@0: * the given primitive IDL type. aoqi@0: * aoqi@0: * @param tcKind the TCKind instance corresponding to the aoqi@0: * desired primitive type aoqi@0: * @return the requested TypeCode object aoqi@0: */ aoqi@0: abstract public TypeCode get_primitive_tc(TCKind tcKind); aoqi@0: aoqi@0: /** aoqi@0: * Creates a TypeCode object representing an IDL struct. aoqi@0: * The TypeCode object is initialized with the given id, aoqi@0: * name, and members. aoqi@0: * aoqi@0: * @param id the repository id for the struct aoqi@0: * @param name the name of the struct aoqi@0: * @param members an array describing the members of the struct aoqi@0: * @return a newly-created TypeCode object describing aoqi@0: * an IDL struct aoqi@0: */ aoqi@0: abstract public TypeCode create_struct_tc(String id, String name, aoqi@0: StructMember[] members); aoqi@0: aoqi@0: /** aoqi@0: * Creates a TypeCode object representing an IDL union. aoqi@0: * The TypeCode object is initialized with the given id, aoqi@0: * name, discriminator type, and members. aoqi@0: * aoqi@0: * @param id the repository id of the union aoqi@0: * @param name the name of the union aoqi@0: * @param discriminator_type the type of the union discriminator aoqi@0: * @param members an array describing the members of the union aoqi@0: * @return a newly-created TypeCode object describing aoqi@0: * an IDL union aoqi@0: */ aoqi@0: abstract public TypeCode create_union_tc(String id, String name, aoqi@0: TypeCode discriminator_type, aoqi@0: UnionMember[] members); aoqi@0: aoqi@0: /** aoqi@0: * Creates a TypeCode object representing an IDL enum. aoqi@0: * The TypeCode object is initialized with the given id, aoqi@0: * name, and members. aoqi@0: * aoqi@0: * @param id the repository id for the enum aoqi@0: * @param name the name for the enum aoqi@0: * @param members an array describing the members of the enum aoqi@0: * @return a newly-created TypeCode object describing aoqi@0: * an IDL enum aoqi@0: */ aoqi@0: abstract public TypeCode create_enum_tc(String id, String name, String[] members); aoqi@0: aoqi@0: /** aoqi@0: * Creates a TypeCode object representing an IDL alias aoqi@0: * (typedef). aoqi@0: * The TypeCode object is initialized with the given id, aoqi@0: * name, and original type. aoqi@0: * aoqi@0: * @param id the repository id for the alias aoqi@0: * @param name the name for the alias aoqi@0: * @param original_type aoqi@0: * the TypeCode object describing the original type aoqi@0: * for which this is an alias aoqi@0: * @return a newly-created TypeCode object describing aoqi@0: * an IDL alias aoqi@0: */ aoqi@0: abstract public TypeCode create_alias_tc(String id, String name, aoqi@0: TypeCode original_type); aoqi@0: aoqi@0: /** aoqi@0: * Creates a TypeCode object representing an IDL exception. aoqi@0: * The TypeCode object is initialized with the given id, aoqi@0: * name, and members. aoqi@0: * aoqi@0: * @param id the repository id for the exception aoqi@0: * @param name the name for the exception aoqi@0: * @param members an array describing the members of the exception aoqi@0: * @return a newly-created TypeCode object describing aoqi@0: * an IDL exception aoqi@0: */ aoqi@0: abstract public TypeCode create_exception_tc(String id, String name, aoqi@0: StructMember[] members); aoqi@0: aoqi@0: /** aoqi@0: * Creates a TypeCode object representing an IDL interface. aoqi@0: * The TypeCode object is initialized with the given id aoqi@0: * and name. aoqi@0: * aoqi@0: * @param id the repository id for the interface aoqi@0: * @param name the name for the interface aoqi@0: * @return a newly-created TypeCode object describing aoqi@0: * an IDL interface aoqi@0: */ aoqi@0: aoqi@0: abstract public TypeCode create_interface_tc(String id, String name); aoqi@0: aoqi@0: /** aoqi@0: * Creates a TypeCode object representing a bounded IDL aoqi@0: * string. aoqi@0: * The TypeCode object is initialized with the given bound, aoqi@0: * which represents the maximum length of the string. Zero indicates aoqi@0: * that the string described by this type code is unbounded. aoqi@0: * aoqi@0: * @param bound the bound for the string; cannot be negative aoqi@0: * @return a newly-created TypeCode object describing aoqi@0: * a bounded IDL string aoqi@0: * @exception BAD_PARAM if bound is a negative value aoqi@0: */ aoqi@0: aoqi@0: abstract public TypeCode create_string_tc(int bound); aoqi@0: aoqi@0: /** aoqi@0: * Creates a TypeCode object representing a bounded IDL aoqi@0: * wstring (wide string). aoqi@0: * The TypeCode object is initialized with the given bound, aoqi@0: * which represents the maximum length of the wide string. Zero indicates aoqi@0: * that the string described by this type code is unbounded. aoqi@0: * aoqi@0: * @param bound the bound for the wstring; cannot be negative aoqi@0: * @return a newly-created TypeCode object describing aoqi@0: * a bounded IDL wstring aoqi@0: * @exception BAD_PARAM if bound is a negative value aoqi@0: */ aoqi@0: abstract public TypeCode create_wstring_tc(int bound); aoqi@0: aoqi@0: /** aoqi@0: * Creates a TypeCode object representing an IDL sequence. aoqi@0: * The TypeCode object is initialized with the given bound and aoqi@0: * element type. aoqi@0: * aoqi@0: * @param bound the bound for the sequence, 0 if unbounded aoqi@0: * @param element_type aoqi@0: * the TypeCode object describing the elements aoqi@0: * contained in the sequence aoqi@0: * @return a newly-created TypeCode object describing aoqi@0: * an IDL sequence aoqi@0: */ aoqi@0: abstract public TypeCode create_sequence_tc(int bound, TypeCode element_type); aoqi@0: aoqi@0: /** aoqi@0: * Creates a TypeCode object representing a aoqi@0: * a recursive IDL sequence. aoqi@0: *

aoqi@0: * For the IDL struct Node in following code fragment, aoqi@0: * the offset parameter for creating its sequence would be 1: aoqi@0: *

aoqi@0:      *    Struct Node {
aoqi@0:      *        long value;
aoqi@0:      *        Sequence <Node> subnodes;
aoqi@0:      *    };
aoqi@0:      * 
aoqi@0: * aoqi@0: * @param bound the bound for the sequence, 0 if unbounded aoqi@0: * @param offset the index to the enclosing TypeCode object aoqi@0: * that describes the elements of this sequence aoqi@0: * @return a newly-created TypeCode object describing aoqi@0: * a recursive sequence aoqi@0: * @deprecated Use a combination of create_recursive_tc and create_sequence_tc instead aoqi@0: * @see #create_recursive_tc(String) create_recursive_tc aoqi@0: * @see #create_sequence_tc(int, TypeCode) create_sequence_tc aoqi@0: */ aoqi@0: @Deprecated aoqi@0: abstract public TypeCode create_recursive_sequence_tc(int bound, int offset); aoqi@0: aoqi@0: /** aoqi@0: * Creates a TypeCode object representing an IDL array. aoqi@0: * The TypeCode object is initialized with the given length and aoqi@0: * element type. aoqi@0: * aoqi@0: * @param length the length of the array aoqi@0: * @param element_type a TypeCode object describing the type aoqi@0: * of element contained in the array aoqi@0: * @return a newly-created TypeCode object describing aoqi@0: * an IDL array aoqi@0: */ aoqi@0: abstract public TypeCode create_array_tc(int length, TypeCode element_type); aoqi@0: aoqi@0: /** aoqi@0: * Create a TypeCode object for an IDL native type. aoqi@0: * aoqi@0: * @param id the logical id for the native type. aoqi@0: * @param name the name of the native type. aoqi@0: * @return the requested TypeCode. aoqi@0: */ aoqi@0: public org.omg.CORBA.TypeCode create_native_tc(String id, aoqi@0: String name) aoqi@0: { aoqi@0: throw new org.omg.CORBA.NO_IMPLEMENT(); aoqi@0: } aoqi@0: aoqi@0: /** aoqi@0: * Create a TypeCode object for an IDL abstract interface. aoqi@0: * aoqi@0: * @param id the logical id for the abstract interface type. aoqi@0: * @param name the name of the abstract interface type. aoqi@0: * @return the requested TypeCode. aoqi@0: */ aoqi@0: public org.omg.CORBA.TypeCode create_abstract_interface_tc( aoqi@0: String id, aoqi@0: String name) aoqi@0: { aoqi@0: throw new org.omg.CORBA.NO_IMPLEMENT(); aoqi@0: } aoqi@0: aoqi@0: aoqi@0: /** aoqi@0: * Create a TypeCode object for an IDL fixed type. aoqi@0: * aoqi@0: * @param digits specifies the total number of decimal digits in the number aoqi@0: * and must be from 1 to 31 inclusive. aoqi@0: * @param scale specifies the position of the decimal point. aoqi@0: * @return the requested TypeCode. aoqi@0: */ aoqi@0: public org.omg.CORBA.TypeCode create_fixed_tc(short digits, short scale) aoqi@0: { aoqi@0: throw new org.omg.CORBA.NO_IMPLEMENT(); aoqi@0: } aoqi@0: aoqi@0: aoqi@0: // orbos 98-01-18: Objects By Value -- begin aoqi@0: aoqi@0: aoqi@0: /** aoqi@0: * Create a TypeCode object for an IDL value type. aoqi@0: * The concrete_base parameter is the TypeCode for the immediate aoqi@0: * concrete valuetype base of the valuetype for which the TypeCode aoqi@0: * is being created. aoqi@0: * It may be null if the valuetype does not have a concrete base. aoqi@0: * aoqi@0: * @param id the logical id for the value type. aoqi@0: * @param name the name of the value type. aoqi@0: * @param type_modifier one of the value type modifier constants: aoqi@0: * VM_NONE, VM_CUSTOM, VM_ABSTRACT or VM_TRUNCATABLE aoqi@0: * @param concrete_base a TypeCode object aoqi@0: * describing the concrete valuetype base aoqi@0: * @param members an array containing the members of the value type aoqi@0: * @return the requested TypeCode aoqi@0: */ aoqi@0: public org.omg.CORBA.TypeCode create_value_tc(String id, aoqi@0: String name, aoqi@0: short type_modifier, aoqi@0: TypeCode concrete_base, aoqi@0: ValueMember[] members) aoqi@0: { aoqi@0: throw new org.omg.CORBA.NO_IMPLEMENT(); aoqi@0: } aoqi@0: aoqi@0: /** aoqi@0: * Create a recursive TypeCode object which aoqi@0: * serves as a placeholder for a concrete TypeCode during the process of creating aoqi@0: * TypeCodes which contain recursion. The id parameter specifies the repository id of aoqi@0: * the type for which the recursive TypeCode is serving as a placeholder. Once the aoqi@0: * recursive TypeCode has been properly embedded in the enclosing TypeCode which aoqi@0: * corresponds to the specified repository id, it will function as a normal TypeCode. aoqi@0: * Invoking operations on the recursive TypeCode before it has been embedded in the aoqi@0: * enclosing TypeCode will result in a BAD_TYPECODE exception. aoqi@0: *

aoqi@0: * For example, the following IDL type declaration contains recursion: aoqi@0: *

aoqi@0:      *    Struct Node {
aoqi@0:      *        Sequence<Node> subnodes;
aoqi@0:      *    };
aoqi@0:      * 
aoqi@0: *

aoqi@0: * To create a TypeCode for struct Node, you would invoke the TypeCode creation aoqi@0: * operations as shown below: aoqi@0: *

aoqi@0:      * String nodeID = "IDL:Node:1.0";
aoqi@0:      * TypeCode recursiveSeqTC = orb.create_sequence_tc(0, orb.create_recursive_tc(nodeID));
aoqi@0:      * StructMember[] members = { new StructMember("subnodes", recursiveSeqTC, null) };
aoqi@0:      * TypeCode structNodeTC = orb.create_struct_tc(nodeID, "Node", members);
aoqi@0:      * 
aoqi@0: *

aoqi@0: * Also note that the following is an illegal IDL type declaration: aoqi@0: *

aoqi@0:      *    Struct Node {
aoqi@0:      *        Node next;
aoqi@0:      *    };
aoqi@0:      * 
aoqi@0: *

aoqi@0: * Recursive types can only appear within sequences which can be empty. aoqi@0: * That way marshaling problems, when transmitting the struct in an Any, are avoided. aoqi@0: *

aoqi@0: * @param id the logical id of the referenced type aoqi@0: * @return the requested TypeCode aoqi@0: */ aoqi@0: public org.omg.CORBA.TypeCode create_recursive_tc(String id) { aoqi@0: // implemented in subclass aoqi@0: throw new org.omg.CORBA.NO_IMPLEMENT(); aoqi@0: } aoqi@0: aoqi@0: /** aoqi@0: * Creates a TypeCode object for an IDL value box. aoqi@0: * aoqi@0: * @param id the logical id for the value type aoqi@0: * @param name the name of the value type aoqi@0: * @param boxed_type the TypeCode for the type aoqi@0: * @return the requested TypeCode aoqi@0: */ aoqi@0: public org.omg.CORBA.TypeCode create_value_box_tc(String id, aoqi@0: String name, aoqi@0: TypeCode boxed_type) aoqi@0: { aoqi@0: // implemented in subclass aoqi@0: throw new org.omg.CORBA.NO_IMPLEMENT(); aoqi@0: } aoqi@0: aoqi@0: // orbos 98-01-18: Objects By Value -- end aoqi@0: aoqi@0: /** aoqi@0: * Creates an IDL Any object initialized to aoqi@0: * contain a Typecode object whose kind field aoqi@0: * is set to TCKind.tc_null. aoqi@0: * aoqi@0: * @return a newly-created Any object aoqi@0: */ aoqi@0: abstract public Any create_any(); aoqi@0: aoqi@0: aoqi@0: aoqi@0: aoqi@0: /** aoqi@0: * Retrieves a Current object. aoqi@0: * The Current interface is used to manage thread-specific aoqi@0: * information for use by services such as transactions and security. aoqi@0: * aoqi@0: * @see CORBA package aoqi@0: * comments for unimplemented features aoqi@0: * aoqi@0: * @return a newly-created Current object aoqi@0: * @deprecated use resolve_initial_references. aoqi@0: */ aoqi@0: @Deprecated aoqi@0: public org.omg.CORBA.Current get_current() aoqi@0: { aoqi@0: throw new org.omg.CORBA.NO_IMPLEMENT(); aoqi@0: } aoqi@0: aoqi@0: /** aoqi@0: * This operation blocks the current thread until the ORB has aoqi@0: * completed the shutdown process, initiated when some thread calls aoqi@0: * shutdown. It may be used by multiple threads which aoqi@0: * get all notified when the ORB shuts down. aoqi@0: * aoqi@0: */ aoqi@0: public void run() aoqi@0: { aoqi@0: throw new org.omg.CORBA.NO_IMPLEMENT(); aoqi@0: } aoqi@0: aoqi@0: /** aoqi@0: * Instructs the ORB to shut down, which causes all aoqi@0: * object adapters to shut down, in preparation for destruction.
aoqi@0: * If the wait_for_completion parameter aoqi@0: * is true, this operation blocks until all ORB processing (including aoqi@0: * processing of currently executing requests, object deactivation, aoqi@0: * and other object adapter operations) has completed. aoqi@0: * If an application does this in a thread that is currently servicing aoqi@0: * an invocation, the BAD_INV_ORDER system exception aoqi@0: * will be thrown with the OMG minor code 3, aoqi@0: * since blocking would result in a deadlock.
aoqi@0: * If the wait_for_completion parameter is FALSE, aoqi@0: * then shutdown may not have completed upon return.

aoqi@0: * While the ORB is in the process of shutting down, the ORB operates as normal, aoqi@0: * servicing incoming and outgoing requests until all requests have been completed. aoqi@0: * Once an ORB has shutdown, only object reference management operations aoqi@0: * may be invoked on the ORB or any object reference obtained from it. aoqi@0: * An application may also invoke the destroy operation on the ORB itself. aoqi@0: * Invoking any other operation will throw the BAD_INV_ORDER aoqi@0: * system exception with the OMG minor code 4.

aoqi@0: * The ORB.run method will return after aoqi@0: * shutdown has been called. aoqi@0: * aoqi@0: * @param wait_for_completion true if the call aoqi@0: * should block until the shutdown is complete; aoqi@0: * false if it should return immediately aoqi@0: * @throws org.omg.CORBA.BAD_INV_ORDER if the current thread is servicing aoqi@0: * an invocation aoqi@0: */ aoqi@0: public void shutdown(boolean wait_for_completion) aoqi@0: { aoqi@0: throw new org.omg.CORBA.NO_IMPLEMENT(); aoqi@0: } aoqi@0: aoqi@0: /** aoqi@0: * Returns true if the ORB needs the main thread to aoqi@0: * perform some work, and false if the ORB does not aoqi@0: * need the main thread. aoqi@0: * aoqi@0: * @return true if there is work pending, meaning that the ORB aoqi@0: * needs the main thread to perform some work; false aoqi@0: * if there is no work pending and thus the ORB does not need the aoqi@0: * main thread aoqi@0: * aoqi@0: */ aoqi@0: public boolean work_pending() aoqi@0: { aoqi@0: throw new org.omg.CORBA.NO_IMPLEMENT(); aoqi@0: } aoqi@0: aoqi@0: /** aoqi@0: * Performs an implementation-dependent unit of work if called aoqi@0: * by the main thread. Otherwise it does nothing. aoqi@0: * The methods work_pending and perform_work aoqi@0: * can be used in aoqi@0: * conjunction to implement a simple polling loop that multiplexes aoqi@0: * the main thread among the ORB and other activities. aoqi@0: * aoqi@0: */ aoqi@0: public void perform_work() aoqi@0: { aoqi@0: throw new org.omg.CORBA.NO_IMPLEMENT(); aoqi@0: } aoqi@0: aoqi@0: /** aoqi@0: * Used to obtain information about CORBA facilities and services aoqi@0: * that are supported by this ORB. The service type for which aoqi@0: * information is being requested is passed in as the in aoqi@0: * parameter service_type, the values defined by aoqi@0: * constants in the CORBA module. If service information is aoqi@0: * available for that type, that is returned in the out parameter aoqi@0: * service_info, and the operation returns the aoqi@0: * value true. If no information for the requested aoqi@0: * services type is available, the operation returns false aoqi@0: * (i.e., the service is not supported by this ORB). aoqi@0: *

aoqi@0: * @param service_type a short indicating the aoqi@0: * service type for which information is being requested aoqi@0: * @param service_info a ServiceInformationHolder object aoqi@0: * that will hold the ServiceInformation object aoqi@0: * produced by this method aoqi@0: * @return true if service information is available aoqi@0: * for the service_type; aoqi@0: * false if no information for the aoqi@0: * requested services type is available aoqi@0: * @see CORBA package aoqi@0: * comments for unimplemented features aoqi@0: */ aoqi@0: public boolean get_service_information(short service_type, aoqi@0: ServiceInformationHolder service_info) aoqi@0: { aoqi@0: throw new org.omg.CORBA.NO_IMPLEMENT(); aoqi@0: } aoqi@0: aoqi@0: // orbos 98-01-18: Objects By Value -- begin aoqi@0: aoqi@0: /** aoqi@0: * Creates a new DynAny object from the given aoqi@0: * Any object. aoqi@0: *

aoqi@0: * @param value the Any object from which to create a new aoqi@0: * DynAny object aoqi@0: * @return the new DynAny object created from the given aoqi@0: * Any object aoqi@0: * @see CORBA package aoqi@0: * comments for unimplemented features aoqi@0: * @deprecated Use the new DynAnyFactory API instead aoqi@0: */ aoqi@0: @Deprecated aoqi@0: public org.omg.CORBA.DynAny create_dyn_any(org.omg.CORBA.Any value) aoqi@0: { aoqi@0: throw new org.omg.CORBA.NO_IMPLEMENT(); aoqi@0: } aoqi@0: aoqi@0: /** aoqi@0: * Creates a basic DynAny object from the given aoqi@0: * TypeCode object. aoqi@0: *

aoqi@0: * @param type the TypeCode object from which to create a new aoqi@0: * DynAny object aoqi@0: * @return the new DynAny object created from the given aoqi@0: * TypeCode object aoqi@0: * @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given aoqi@0: * TypeCode object is not consistent with the operation. aoqi@0: * @see CORBA package aoqi@0: * comments for unimplemented features aoqi@0: * @deprecated Use the new DynAnyFactory API instead aoqi@0: */ aoqi@0: @Deprecated aoqi@0: public org.omg.CORBA.DynAny create_basic_dyn_any(org.omg.CORBA.TypeCode type) throws org.omg.CORBA.ORBPackage.InconsistentTypeCode aoqi@0: { aoqi@0: throw new org.omg.CORBA.NO_IMPLEMENT(); aoqi@0: } aoqi@0: aoqi@0: /** aoqi@0: * Creates a new DynStruct object from the given aoqi@0: * TypeCode object. aoqi@0: *

aoqi@0: * @param type the TypeCode object from which to create a new aoqi@0: * DynStruct object aoqi@0: * @return the new DynStruct object created from the given aoqi@0: * TypeCode object aoqi@0: * @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given aoqi@0: * TypeCode object is not consistent with the operation. aoqi@0: * @see CORBA package aoqi@0: * comments for unimplemented features aoqi@0: * @deprecated Use the new DynAnyFactory API instead aoqi@0: */ aoqi@0: @Deprecated aoqi@0: public org.omg.CORBA.DynStruct create_dyn_struct(org.omg.CORBA.TypeCode type) throws org.omg.CORBA.ORBPackage.InconsistentTypeCode aoqi@0: { aoqi@0: throw new org.omg.CORBA.NO_IMPLEMENT(); aoqi@0: } aoqi@0: aoqi@0: /** aoqi@0: * Creates a new DynSequence object from the given aoqi@0: * TypeCode object. aoqi@0: *

aoqi@0: * @param type the TypeCode object from which to create a new aoqi@0: * DynSequence object aoqi@0: * @return the new DynSequence object created from the given aoqi@0: * TypeCode object aoqi@0: * @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given aoqi@0: * TypeCode object is not consistent with the operation. aoqi@0: * @see CORBA package aoqi@0: * comments for unimplemented features aoqi@0: * @deprecated Use the new DynAnyFactory API instead aoqi@0: */ aoqi@0: @Deprecated aoqi@0: public org.omg.CORBA.DynSequence create_dyn_sequence(org.omg.CORBA.TypeCode type) throws org.omg.CORBA.ORBPackage.InconsistentTypeCode aoqi@0: { aoqi@0: throw new org.omg.CORBA.NO_IMPLEMENT(); aoqi@0: } aoqi@0: aoqi@0: aoqi@0: /** aoqi@0: * Creates a new DynArray object from the given aoqi@0: * TypeCode object. aoqi@0: *

aoqi@0: * @param type the TypeCode object from which to create a new aoqi@0: * DynArray object aoqi@0: * @return the new DynArray object created from the given aoqi@0: * TypeCode object aoqi@0: * @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given aoqi@0: * TypeCode object is not consistent with the operation. aoqi@0: * @see CORBA package aoqi@0: * comments for unimplemented features aoqi@0: * @deprecated Use the new DynAnyFactory API instead aoqi@0: */ aoqi@0: @Deprecated aoqi@0: public org.omg.CORBA.DynArray create_dyn_array(org.omg.CORBA.TypeCode type) throws org.omg.CORBA.ORBPackage.InconsistentTypeCode aoqi@0: { aoqi@0: throw new org.omg.CORBA.NO_IMPLEMENT(); aoqi@0: } aoqi@0: aoqi@0: /** aoqi@0: * Creates a new DynUnion object from the given aoqi@0: * TypeCode object. aoqi@0: *

aoqi@0: * @param type the TypeCode object from which to create a new aoqi@0: * DynUnion object aoqi@0: * @return the new DynUnion object created from the given aoqi@0: * TypeCode object aoqi@0: * @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given aoqi@0: * TypeCode object is not consistent with the operation. aoqi@0: * @see CORBA package aoqi@0: * comments for unimplemented features aoqi@0: * @deprecated Use the new DynAnyFactory API instead aoqi@0: */ aoqi@0: @Deprecated aoqi@0: public org.omg.CORBA.DynUnion create_dyn_union(org.omg.CORBA.TypeCode type) throws org.omg.CORBA.ORBPackage.InconsistentTypeCode aoqi@0: { aoqi@0: throw new org.omg.CORBA.NO_IMPLEMENT(); aoqi@0: } aoqi@0: aoqi@0: /** aoqi@0: * Creates a new DynEnum object from the given aoqi@0: * TypeCode object. aoqi@0: *

aoqi@0: * @param type the TypeCode object from which to create a new aoqi@0: * DynEnum object aoqi@0: * @return the new DynEnum object created from the given aoqi@0: * TypeCode object aoqi@0: * @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given aoqi@0: * TypeCode object is not consistent with the operation. aoqi@0: * @see CORBA package aoqi@0: * comments for unimplemented features aoqi@0: * @deprecated Use the new DynAnyFactory API instead aoqi@0: */ aoqi@0: @Deprecated aoqi@0: public org.omg.CORBA.DynEnum create_dyn_enum(org.omg.CORBA.TypeCode type) throws org.omg.CORBA.ORBPackage.InconsistentTypeCode aoqi@0: { aoqi@0: throw new org.omg.CORBA.NO_IMPLEMENT(); aoqi@0: } aoqi@0: aoqi@0: /** aoqi@0: * Can be invoked to create new instances of policy objects aoqi@0: * of a specific type with specified initial state. If aoqi@0: * create_policy fails to instantiate a new Policy aoqi@0: * object due to its inability to interpret the requested type aoqi@0: * and content of the policy, it raises the PolicyError aoqi@0: * exception with the appropriate reason. aoqi@0: * @param type the PolicyType of the policy object to aoqi@0: * be created aoqi@0: * @param val the value that will be used to set the initial aoqi@0: * state of the Policy object that is created aoqi@0: * @return Reference to a newly created Policy object aoqi@0: * of type specified by the type parameter and aoqi@0: * initialized to a state specified by the val aoqi@0: * parameter aoqi@0: * @throws org.omg.CORBA.PolicyError when the requested aoqi@0: * policy is not supported or a requested initial state aoqi@0: * for the policy is not supported. aoqi@0: */ aoqi@0: public org.omg.CORBA.Policy create_policy(int type, org.omg.CORBA.Any val) aoqi@0: throws org.omg.CORBA.PolicyError aoqi@0: { aoqi@0: // Currently not implemented until PIORB. aoqi@0: throw new org.omg.CORBA.NO_IMPLEMENT(); aoqi@0: } aoqi@0: }