src/share/classes/org/omg/CORBA/ORB.java

Thu, 31 Aug 2017 18:10:36 +0800

author
aoqi
date
Thu, 31 Aug 2017 18:10:36 +0800
changeset 748
6845b95cba6b
parent 660
009fc3f785a9
parent 0
7ef37b2cdcad
permissions
-rw-r--r--

merge

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

mercurial