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

Thu, 21 Nov 2013 11:30:39 +0000

author
msheppar
date
Thu, 21 Nov 2013 11:30:39 +0000
changeset 545
fe781b3badd6
parent 533
52ad44f9a3ec
child 615
8b0b643ffd42
permissions
-rw-r--r--

8028215: ORB.init fails with SecurityException if properties select the JDK default ORB
Summary: check for default ORBImpl and ORBSingleton set via properties or System properties
Reviewed-by: alanb, coffeys, mchung

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

mercurial