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

Tue, 21 Jan 2014 16:26:59 +0000

author
msheppar
date
Tue, 21 Jan 2014 16:26:59 +0000
changeset 615
8b0b643ffd42
parent 545
fe781b3badd6
child 660
009fc3f785a9
permissions
-rw-r--r--

8025005: Enhance CORBA initializations
Summary: restructure ORB.init() processing flow.
Reviewed-by: alanb, coffeys, skoivu

     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_with_systemclassloader(className);
   295             }
   296         }
   297         return singleton;
   298     }
   300    private static ORB create_impl_with_systemclassloader(String className) {
   302         try {
   303             ReflectUtil.checkPackageAccess(className);
   304             ClassLoader cl = ClassLoader.getSystemClassLoader();
   305             Class<org.omg.CORBA.ORB> orbBaseClass = org.omg.CORBA.ORB.class;
   306             Class<?> singletonOrbClass = Class.forName(className, true, cl).asSubclass(orbBaseClass);
   307             return (ORB)singletonOrbClass.newInstance();
   308         } catch (Throwable ex) {
   309             SystemException systemException = new INITIALIZE(
   310                 "can't instantiate default ORB implementation " + className);
   311             systemException.initCause(ex);
   312             throw systemException;
   313         }
   314     }
   316     private static ORB create_impl(String className) {
   317         ClassLoader cl = Thread.currentThread().getContextClassLoader();
   318         if (cl == null)
   319             cl = ClassLoader.getSystemClassLoader();
   321         try {
   322             ReflectUtil.checkPackageAccess(className);
   323             Class<org.omg.CORBA.ORB> orbBaseClass = org.omg.CORBA.ORB.class;
   324             Class<?> orbClass = Class.forName(className, true, cl).asSubclass(orbBaseClass);
   325             return (ORB)orbClass.newInstance();
   326         } catch (Throwable ex) {
   327             SystemException systemException = new INITIALIZE(
   328                "can't instantiate default ORB implementation " + className);
   329             systemException.initCause(ex);
   330             throw systemException;
   331         }
   332     }
   334     /**
   335      * Creates a new <code>ORB</code> instance for a standalone
   336      * application.  This method may be called from applications
   337      * only and returns a new fully functional <code>ORB</code> object
   338      * each time it is called.
   339      * @param args command-line arguments for the application's <code>main</code>
   340      *             method; may be <code>null</code>
   341      * @param props application-specific properties; may be <code>null</code>
   342      * @return the newly-created ORB instance
   343      */
   344     public static ORB init(String[] args, Properties props) {
   345         //
   346         // Note that there is no standard command-line argument for
   347         // specifying the default ORB implementation. For an
   348         // application you can choose an implementation either by
   349         // setting the CLASSPATH to pick a different org.omg.CORBA
   350         // and it's baked-in ORB implementation default or by
   351         // setting an entry in the properties object or in the
   352         // system properties.
   353         //
   354         String className = null;
   355         ORB orb;
   357         if (props != null)
   358             className = props.getProperty(ORBClassKey);
   359         if (className == null)
   360             className = getSystemProperty(ORBClassKey);
   361         if (className == null)
   362             className = getPropertyFromFile(ORBClassKey);
   363         if ((className == null) ||
   364                     (className.equals("com.sun.corba.se.impl.orb.ORBImpl"))) {
   365             orb = new com.sun.corba.se.impl.orb.ORBImpl();
   366         } else {
   367             orb = create_impl(className);
   368         }
   369         orb.set_parameters(args, props);
   370         return orb;
   371     }
   374     /**
   375      * Creates a new <code>ORB</code> instance for an applet.  This
   376      * method may be called from applets only and returns a new
   377      * fully-functional <code>ORB</code> object each time it is called.
   378      * @param app the applet; may be <code>null</code>
   379      * @param props applet-specific properties; may be <code>null</code>
   380      * @return the newly-created ORB instance
   381      */
   382     public static ORB init(Applet app, Properties props) {
   383         String className;
   384         ORB orb;
   386         className = app.getParameter(ORBClassKey);
   387         if (className == null && props != null)
   388             className = props.getProperty(ORBClassKey);
   389         if (className == null)
   390             className = getSystemProperty(ORBClassKey);
   391         if (className == null)
   392             className = getPropertyFromFile(ORBClassKey);
   393         if ((className == null) ||
   394                     (className.equals("com.sun.corba.se.impl.orb.ORBImpl"))) {
   395             orb = new com.sun.corba.se.impl.orb.ORBImpl();
   396         } else {
   397             orb = create_impl(className);
   398         }
   399         orb.set_parameters(app, props);
   400         return orb;
   401     }
   403     /**
   404      * Allows the ORB implementation to be initialized with the given
   405      * parameters and properties. This method, used in applications only,
   406      * is implemented by subclass ORB implementations and called
   407      * by the appropriate <code>init</code> method to pass in its parameters.
   408      *
   409      * @param args command-line arguments for the application's <code>main</code>
   410      *             method; may be <code>null</code>
   411      * @param props application-specific properties; may be <code>null</code>
   412      */
   413     abstract protected void set_parameters(String[] args, Properties props);
   415     /**
   416      * Allows the ORB implementation to be initialized with the given
   417      * applet and parameters. This method, used in applets only,
   418      * is implemented by subclass ORB implementations and called
   419      * by the appropriate <code>init</code> method to pass in its parameters.
   420      *
   421      * @param app the applet; may be <code>null</code>
   422      * @param props applet-specific properties; may be <code>null</code>
   423      */
   424     abstract protected void set_parameters(Applet app, Properties props);
   426     /**
   427      * Connects the given servant object (a Java object that is
   428      * an instance of the server implementation class)
   429      * to the ORB. The servant class must
   430      * extend the <code>ImplBase</code> class corresponding to the interface that is
   431      * supported by the server. The servant must thus be a CORBA object
   432      * reference, and inherit from <code>org.omg.CORBA.Object</code>.
   433      * Servants created by the user can start receiving remote invocations
   434      * after the method <code>connect</code> has been called. A servant may also be
   435      * automatically and implicitly connected to the ORB if it is passed as
   436      * an IDL parameter in an IDL method invocation on a non-local object,
   437      * that is, if the servant object has to be marshalled and sent outside of the
   438      * process address space.
   439      * <P>
   440      * Calling the method <code>connect</code> has no effect
   441      * when the servant object is already connected to the ORB.
   442      * <P>
   443      * Deprecated by the OMG in favor of the Portable Object Adapter APIs.
   444      *
   445      * @param obj The servant object reference
   446      */
   447     public void connect(org.omg.CORBA.Object obj) {
   448         throw new NO_IMPLEMENT();
   449     }
   451     /**
   452      * Destroys the ORB so that its resources can be reclaimed.
   453      * Any operation invoked on a destroyed ORB reference will throw the
   454      * <code>OBJECT_NOT_EXIST</code> exception.
   455      * Once an ORB has been destroyed, another call to <code>init</code>
   456      * with the same ORBid will return a reference to a newly constructed ORB.<p>
   457      * If <code>destroy</code> is called on an ORB that has not been shut down,
   458      * it will start the shut down process and block until the ORB has shut down
   459      * before it destroys the ORB.<br>
   460      * If an application calls <code>destroy</code> in a thread that is currently servicing
   461      * an invocation, the <code>BAD_INV_ORDER</code> system exception will be thrown
   462      * with the OMG minor code 3, since blocking would result in a deadlock.<p>
   463      * For maximum portability and to avoid resource leaks, an application should
   464      * always call <code>shutdown</code> and <code>destroy</code>
   465      * on all ORB instances before exiting.
   466      *
   467      * @throws org.omg.CORBA.BAD_INV_ORDER if the current thread is servicing an invocation
   468      */
   469     public void destroy( ) {
   470         throw new NO_IMPLEMENT();
   471     }
   473     /**
   474      * Disconnects the given servant object from the ORB. After this method returns,
   475      * the ORB will reject incoming remote requests for the disconnected
   476      * servant and will send the exception
   477      * <code>org.omg.CORBA.OBJECT_NOT_EXIST</code> back to the
   478      * remote client. Thus the object appears to be destroyed from the
   479      * point of view of remote clients. Note, however, that local requests issued
   480      * using the servant  directly do not
   481      * pass through the ORB; hence, they will continue to be processed by the
   482      * servant.
   483      * <P>
   484      * Calling the method <code>disconnect</code> has no effect
   485      * if the servant is not connected to the ORB.
   486      * <P>
   487      * Deprecated by the OMG in favor of the Portable Object Adapter APIs.
   488      *
   489      * @param obj The servant object to be disconnected from the ORB
   490      */
   491     public void disconnect(org.omg.CORBA.Object obj) {
   492         throw new NO_IMPLEMENT();
   493     }
   495     //
   496     // ORB method implementations.
   497     //
   498     // We are trying to accomplish 2 things at once in this class.
   499     // It can act as a default ORB implementation front-end,
   500     // creating an actual ORB implementation object which is a
   501     // subclass of this ORB class and then delegating the method
   502     // implementations.
   503     //
   504     // To accomplish the delegation model, the 'delegate' private instance
   505     // variable is set if an instance of this class is created directly.
   506     //
   508     /**
   509      * Returns a list of the initially available CORBA object references,
   510      * such as "NameService" and "InterfaceRepository".
   511      *
   512      * @return an array of <code>String</code> objects that represent
   513      *         the object references for CORBA services
   514      *         that are initially available with this ORB
   515      */
   516     abstract public String[] list_initial_services();
   518     /**
   519      * Resolves a specific object reference from the set of available
   520      * initial service names.
   521      *
   522      * @param object_name the name of the initial service as a string
   523      * @return  the object reference associated with the given name
   524      * @exception InvalidName if the given name is not associated with a
   525      *                         known service
   526      */
   527     abstract public org.omg.CORBA.Object resolve_initial_references(String object_name)
   528         throws InvalidName;
   530     /**
   531      * Converts the given CORBA object reference to a string.
   532      * Note that the format of this string is predefined by IIOP, allowing
   533      * strings generated by a different ORB to be converted back into an object
   534      * reference.
   535      * <P>
   536      * The resulting <code>String</code> object may be stored or communicated
   537      * in any way that a <code>String</code> object can be manipulated.
   538      *
   539      * @param obj the object reference to stringify
   540      * @return the string representing the object reference
   541      */
   542     abstract public String object_to_string(org.omg.CORBA.Object obj);
   544     /**
   545      * Converts a string produced by the method <code>object_to_string</code>
   546      * back to a CORBA object reference.
   547      *
   548      * @param str the string to be converted back to an object reference.  It must
   549      * be the result of converting an object reference to a string using the
   550      * method <code>object_to_string</code>.
   551      * @return the object reference
   552      */
   553     abstract public org.omg.CORBA.Object string_to_object(String str);
   555     /**
   556      * Allocates an <code>NVList</code> with (probably) enough
   557      * space for the specified number of <code>NamedValue</code> objects.
   558      * Note that the specified size is only a hint to help with
   559      * storage allocation and does not imply the maximum size of the list.
   560      *
   561      * @param count  suggested number of <code>NamedValue</code> objects for
   562      *               which to allocate space
   563      * @return the newly-created <code>NVList</code>
   564      *
   565      * @see NVList
   566      */
   567     abstract public NVList create_list(int count);
   569     /**
   570      * Creates an <code>NVList</code> initialized with argument
   571      * descriptions for the operation described in the given
   572      * <code>OperationDef</code> object.  This <code>OperationDef</code> object
   573      * is obtained from an Interface Repository. The arguments in the
   574      * returned <code>NVList</code> object are in the same order as in the
   575      * original IDL operation definition, which makes it possible for the list
   576      * to be used in dynamic invocation requests.
   577      *
   578      * @param oper      the <code>OperationDef</code> object to use to create the list
   579      * @return          a newly-created <code>NVList</code> object containing
   580      * descriptions of the arguments to the method described in the given
   581      * <code>OperationDef</code> object
   582      *
   583      * @see NVList
   584      */
   585     public NVList create_operation_list(org.omg.CORBA.Object oper)
   586     {
   587         // If we came here, it means that the actual ORB implementation
   588         // did not have a create_operation_list(...CORBA.Object oper) method,
   589         // so lets check if it has a create_operation_list(OperationDef oper)
   590         // method.
   591         try {
   592             // First try to load the OperationDef class
   593             String opDefClassName = "org.omg.CORBA.OperationDef";
   594             Class<?> opDefClass = null;
   596             ClassLoader cl = Thread.currentThread().getContextClassLoader();
   597             if ( cl == null )
   598                 cl = ClassLoader.getSystemClassLoader();
   599             // if this throws a ClassNotFoundException, it will be caught below.
   600             opDefClass = Class.forName(opDefClassName, true, cl);
   602             // OK, we loaded OperationDef. Now try to get the
   603             // create_operation_list(OperationDef oper) method.
   604             Class<?>[] argc = { opDefClass };
   605             java.lang.reflect.Method meth =
   606                 this.getClass().getMethod("create_operation_list", argc);
   608             // OK, the method exists, so invoke it and be happy.
   609             java.lang.Object[] argx = { oper };
   610             return (org.omg.CORBA.NVList)meth.invoke(this, argx);
   611         }
   612         catch( java.lang.reflect.InvocationTargetException exs ) {
   613             Throwable t = exs.getTargetException();
   614             if (t instanceof Error) {
   615                 throw (Error) t;
   616             }
   617             else if (t instanceof RuntimeException) {
   618                 throw (RuntimeException) t;
   619             }
   620             else {
   621                 throw new org.omg.CORBA.NO_IMPLEMENT();
   622             }
   623         }
   624         catch( RuntimeException ex ) {
   625             throw ex;
   626         }
   627         catch( Exception exr ) {
   628             throw new org.omg.CORBA.NO_IMPLEMENT();
   629         }
   630     }
   633     /**
   634      * Creates a <code>NamedValue</code> object
   635      * using the given name, value, and argument mode flags.
   636      * <P>
   637      * A <code>NamedValue</code> object serves as (1) a parameter or return
   638      * value or (2) a context property.
   639      * It may be used by itself or
   640      * as an element in an <code>NVList</code> object.
   641      *
   642      * @param s  the name of the <code>NamedValue</code> object
   643      * @param any  the <code>Any</code> value to be inserted into the
   644      *             <code>NamedValue</code> object
   645      * @param flags  the argument mode flags for the <code>NamedValue</code>: one of
   646      * <code>ARG_IN.value</code>, <code>ARG_OUT.value</code>,
   647      * or <code>ARG_INOUT.value</code>.
   648      *
   649      * @return  the newly-created <code>NamedValue</code> object
   650      * @see NamedValue
   651      */
   652     abstract public NamedValue create_named_value(String s, Any any, int flags);
   654     /**
   655      * Creates an empty <code>ExceptionList</code> object.
   656      *
   657      * @return  the newly-created <code>ExceptionList</code> object
   658      */
   659     abstract public ExceptionList create_exception_list();
   661     /**
   662      * Creates an empty <code>ContextList</code> object.
   663      *
   664      * @return  the newly-created <code>ContextList</code> object
   665      * @see ContextList
   666      * @see Context
   667      */
   668     abstract public ContextList create_context_list();
   670     /**
   671      * Gets the default <code>Context</code> object.
   672      *
   673      * @return the default <code>Context</code> object
   674      * @see Context
   675      */
   676     abstract public Context get_default_context();
   678     /**
   679      * Creates an <code>Environment</code> object.
   680      *
   681      * @return  the newly-created <code>Environment</code> object
   682      * @see Environment
   683      */
   684     abstract public Environment create_environment();
   686     /**
   687      * Creates a new <code>org.omg.CORBA.portable.OutputStream</code> into which
   688      * IDL method parameters can be marshalled during method invocation.
   689      * @return          the newly-created
   690      *              <code>org.omg.CORBA.portable.OutputStream</code> object
   691      */
   692     abstract public org.omg.CORBA.portable.OutputStream create_output_stream();
   694     /**
   695      * Sends multiple dynamic (DII) requests asynchronously without expecting
   696      * any responses. Note that oneway invocations are not guaranteed to
   697      * reach the server.
   698      *
   699      * @param req               an array of request objects
   700      */
   701     abstract public void send_multiple_requests_oneway(Request[] req);
   703     /**
   704      * Sends multiple dynamic (DII) requests asynchronously.
   705      *
   706      * @param req               an array of <code>Request</code> objects
   707      */
   708     abstract public void send_multiple_requests_deferred(Request[] req);
   710     /**
   711      * Finds out if any of the deferred (asynchronous) invocations have
   712      * a response yet.
   713      * @return <code>true</code> if there is a response available;
   714      *         <code> false</code> otherwise
   715      */
   716     abstract public boolean poll_next_response();
   718     /**
   719      * Gets the next <code>Request</code> instance for which a response
   720      * has been received.
   721      *
   722      * @return          the next <code>Request</code> object ready with a response
   723      * @exception WrongTransaction if the method <code>get_next_response</code>
   724      * is called from a transaction scope different
   725      * from the one from which the original request was sent. See the
   726      * OMG Transaction Service specification for details.
   727      */
   728     abstract public Request get_next_response() throws WrongTransaction;
   730     /**
   731      * Retrieves the <code>TypeCode</code> object that represents
   732      * the given primitive IDL type.
   733      *
   734      * @param tcKind    the <code>TCKind</code> instance corresponding to the
   735      *                  desired primitive type
   736      * @return          the requested <code>TypeCode</code> object
   737      */
   738     abstract public TypeCode get_primitive_tc(TCKind tcKind);
   740     /**
   741      * Creates a <code>TypeCode</code> object representing an IDL <code>struct</code>.
   742      * The <code>TypeCode</code> object is initialized with the given id,
   743      * name, and members.
   744      *
   745      * @param id        the repository id for the <code>struct</code>
   746      * @param name      the name of the <code>struct</code>
   747      * @param members   an array describing the members of the <code>struct</code>
   748      * @return          a newly-created <code>TypeCode</code> object describing
   749      *              an IDL <code>struct</code>
   750      */
   751     abstract public TypeCode create_struct_tc(String id, String name,
   752                                               StructMember[] members);
   754     /**
   755      * Creates a <code>TypeCode</code> object representing an IDL <code>union</code>.
   756      * The <code>TypeCode</code> object is initialized with the given id,
   757      * name, discriminator type, and members.
   758      *
   759      * @param id        the repository id of the <code>union</code>
   760      * @param name      the name of the <code>union</code>
   761      * @param discriminator_type        the type of the <code>union</code> discriminator
   762      * @param members   an array describing the members of the <code>union</code>
   763      * @return          a newly-created <code>TypeCode</code> object describing
   764      *              an IDL <code>union</code>
   765      */
   766     abstract public TypeCode create_union_tc(String id, String name,
   767                                              TypeCode discriminator_type,
   768                                              UnionMember[] members);
   770     /**
   771      * Creates a <code>TypeCode</code> object representing an IDL <code>enum</code>.
   772      * The <code>TypeCode</code> object is initialized with the given id,
   773      * name, and members.
   774      *
   775      * @param id        the repository id for the <code>enum</code>
   776      * @param name      the name for the <code>enum</code>
   777      * @param members   an array describing the members of the <code>enum</code>
   778      * @return          a newly-created <code>TypeCode</code> object describing
   779      *              an IDL <code>enum</code>
   780      */
   781     abstract public TypeCode create_enum_tc(String id, String name, String[] members);
   783     /**
   784      * Creates a <code>TypeCode</code> object representing an IDL <code>alias</code>
   785      * (<code>typedef</code>).
   786      * The <code>TypeCode</code> object is initialized with the given id,
   787      * name, and original type.
   788      *
   789      * @param id        the repository id for the alias
   790      * @param name      the name for the alias
   791      * @param original_type
   792      *                  the <code>TypeCode</code> object describing the original type
   793      *          for which this is an alias
   794      * @return          a newly-created <code>TypeCode</code> object describing
   795      *              an IDL <code>alias</code>
   796      */
   797     abstract public TypeCode create_alias_tc(String id, String name,
   798                                              TypeCode original_type);
   800     /**
   801      * Creates a <code>TypeCode</code> object representing an IDL <code>exception</code>.
   802      * The <code>TypeCode</code> object is initialized with the given id,
   803      * name, and members.
   804      *
   805      * @param id        the repository id for the <code>exception</code>
   806      * @param name      the name for the <code>exception</code>
   807      * @param members   an array describing the members of the <code>exception</code>
   808      * @return          a newly-created <code>TypeCode</code> object describing
   809      *              an IDL <code>exception</code>
   810      */
   811     abstract public TypeCode create_exception_tc(String id, String name,
   812                                                  StructMember[] members);
   814     /**
   815      * Creates a <code>TypeCode</code> object representing an IDL <code>interface</code>.
   816      * The <code>TypeCode</code> object is initialized with the given id
   817      * and name.
   818      *
   819      * @param id        the repository id for the interface
   820      * @param name      the name for the interface
   821      * @return          a newly-created <code>TypeCode</code> object describing
   822      *              an IDL <code>interface</code>
   823      */
   825     abstract public TypeCode create_interface_tc(String id, String name);
   827     /**
   828      * Creates a <code>TypeCode</code> object representing a bounded IDL
   829      * <code>string</code>.
   830      * The <code>TypeCode</code> object is initialized with the given bound,
   831      * which represents the maximum length of the string. Zero indicates
   832      * that the string described by this type code is unbounded.
   833      *
   834      * @param bound     the bound for the <code>string</code>; cannot be negative
   835      * @return          a newly-created <code>TypeCode</code> object describing
   836      *              a bounded IDL <code>string</code>
   837      * @exception BAD_PARAM if bound is a negative value
   838      */
   840     abstract public TypeCode create_string_tc(int bound);
   842     /**
   843      * Creates a <code>TypeCode</code> object representing a bounded IDL
   844      * <code>wstring</code> (wide string).
   845      * The <code>TypeCode</code> object is initialized with the given bound,
   846      * which represents the maximum length of the wide string. Zero indicates
   847      * that the string described by this type code is unbounded.
   848      *
   849      * @param bound     the bound for the <code>wstring</code>; cannot be negative
   850      * @return          a newly-created <code>TypeCode</code> object describing
   851      *              a bounded IDL <code>wstring</code>
   852      * @exception BAD_PARAM if bound is a negative value
   853      */
   854     abstract public TypeCode create_wstring_tc(int bound);
   856     /**
   857      * Creates a <code>TypeCode</code> object representing an IDL <code>sequence</code>.
   858      * The <code>TypeCode</code> object is initialized with the given bound and
   859      * element type.
   860      *
   861      * @param bound     the bound for the <code>sequence</code>, 0 if unbounded
   862      * @param element_type
   863      *                  the <code>TypeCode</code> object describing the elements
   864      *          contained in the <code>sequence</code>
   865      * @return          a newly-created <code>TypeCode</code> object describing
   866      *              an IDL <code>sequence</code>
   867      */
   868     abstract public TypeCode create_sequence_tc(int bound, TypeCode element_type);
   870     /**
   871      * Creates a <code>TypeCode</code> object representing a
   872      * a recursive IDL <code>sequence</code>.
   873      * <P>
   874      * For the IDL <code>struct</code> Node in following code fragment,
   875      * the offset parameter for creating its sequence would be 1:
   876      * <PRE>
   877      *    Struct Node {
   878      *        long value;
   879      *        Sequence &lt;Node&gt; subnodes;
   880      *    };
   881      * </PRE>
   882      *
   883      * @param bound     the bound for the sequence, 0 if unbounded
   884      * @param offset    the index to the enclosing <code>TypeCode</code> object
   885      *                  that describes the elements of this sequence
   886      * @return          a newly-created <code>TypeCode</code> object describing
   887      *                   a recursive sequence
   888      * @deprecated Use a combination of create_recursive_tc and create_sequence_tc instead
   889      * @see #create_recursive_tc(String) create_recursive_tc
   890      * @see #create_sequence_tc(int, TypeCode) create_sequence_tc
   891      */
   892     @Deprecated
   893     abstract public TypeCode create_recursive_sequence_tc(int bound, int offset);
   895     /**
   896      * Creates a <code>TypeCode</code> object representing an IDL <code>array</code>.
   897      * The <code>TypeCode</code> object is initialized with the given length and
   898      * element type.
   899      *
   900      * @param length    the length of the <code>array</code>
   901      * @param element_type  a <code>TypeCode</code> object describing the type
   902      *                      of element contained in the <code>array</code>
   903      * @return          a newly-created <code>TypeCode</code> object describing
   904      *              an IDL <code>array</code>
   905      */
   906     abstract public TypeCode create_array_tc(int length, TypeCode element_type);
   908     /**
   909      * Create a <code>TypeCode</code> object for an IDL native type.
   910      *
   911      * @param id        the logical id for the native type.
   912      * @param name      the name of the native type.
   913      * @return          the requested TypeCode.
   914      */
   915     public org.omg.CORBA.TypeCode create_native_tc(String id,
   916                                                    String name)
   917     {
   918         throw new org.omg.CORBA.NO_IMPLEMENT();
   919     }
   921     /**
   922      * Create a <code>TypeCode</code> object for an IDL abstract interface.
   923      *
   924      * @param id        the logical id for the abstract interface type.
   925      * @param name      the name of the abstract interface type.
   926      * @return          the requested TypeCode.
   927      */
   928     public org.omg.CORBA.TypeCode create_abstract_interface_tc(
   929                                                                String id,
   930                                                                String name)
   931     {
   932         throw new org.omg.CORBA.NO_IMPLEMENT();
   933     }
   936     /**
   937      * Create a <code>TypeCode</code> object for an IDL fixed type.
   938      *
   939      * @param digits    specifies the total number of decimal digits in the number
   940      *                  and must be from 1 to 31 inclusive.
   941      * @param scale     specifies the position of the decimal point.
   942      * @return          the requested TypeCode.
   943      */
   944     public org.omg.CORBA.TypeCode create_fixed_tc(short digits, short scale)
   945     {
   946         throw new org.omg.CORBA.NO_IMPLEMENT();
   947     }
   950     // orbos 98-01-18: Objects By Value -- begin
   953     /**
   954      * Create a <code>TypeCode</code> object for an IDL value type.
   955      * The concrete_base parameter is the TypeCode for the immediate
   956      * concrete valuetype base of the valuetype for which the TypeCode
   957      * is being created.
   958      * It may be null if the valuetype does not have a concrete base.
   959      *
   960      * @param id                 the logical id for the value type.
   961      * @param name               the name of the value type.
   962      * @param type_modifier      one of the value type modifier constants:
   963      *                           VM_NONE, VM_CUSTOM, VM_ABSTRACT or VM_TRUNCATABLE
   964      * @param concrete_base      a <code>TypeCode</code> object
   965      *                           describing the concrete valuetype base
   966      * @param members            an array containing the members of the value type
   967      * @return                   the requested TypeCode
   968      */
   969     public org.omg.CORBA.TypeCode create_value_tc(String id,
   970                                                   String name,
   971                                                   short type_modifier,
   972                                                   TypeCode concrete_base,
   973                                                   ValueMember[] members)
   974     {
   975         throw new org.omg.CORBA.NO_IMPLEMENT();
   976     }
   978     /**
   979      * Create a recursive <code>TypeCode</code> object which
   980      * serves as a placeholder for a concrete TypeCode during the process of creating
   981      * TypeCodes which contain recursion. The id parameter specifies the repository id of
   982      * the type for which the recursive TypeCode is serving as a placeholder. Once the
   983      * recursive TypeCode has been properly embedded in the enclosing TypeCode which
   984      * corresponds to the specified repository id, it will function as a normal TypeCode.
   985      * Invoking operations on the recursive TypeCode before it has been embedded in the
   986      * enclosing TypeCode will result in a <code>BAD_TYPECODE</code> exception.
   987      * <P>
   988      * For example, the following IDL type declaration contains recursion:
   989      * <PRE>
   990      *    Struct Node {
   991      *        Sequence&lt;Node&gt; subnodes;
   992      *    };
   993      * </PRE>
   994      * <P>
   995      * To create a TypeCode for struct Node, you would invoke the TypeCode creation
   996      * operations as shown below:
   997      * <PRE>
   998      * String nodeID = "IDL:Node:1.0";
   999      * TypeCode recursiveSeqTC = orb.create_sequence_tc(0, orb.create_recursive_tc(nodeID));
  1000      * StructMember[] members = { new StructMember("subnodes", recursiveSeqTC, null) };
  1001      * TypeCode structNodeTC = orb.create_struct_tc(nodeID, "Node", members);
  1002      * </PRE>
  1003      * <P>
  1004      * Also note that the following is an illegal IDL type declaration:
  1005      * <PRE>
  1006      *    Struct Node {
  1007      *        Node next;
  1008      *    };
  1009      * </PRE>
  1010      * <P>
  1011      * Recursive types can only appear within sequences which can be empty.
  1012      * That way marshaling problems, when transmitting the struct in an Any, are avoided.
  1013      * <P>
  1014      * @param id                 the logical id of the referenced type
  1015      * @return                   the requested TypeCode
  1016      */
  1017     public org.omg.CORBA.TypeCode create_recursive_tc(String id) {
  1018         // implemented in subclass
  1019         throw new org.omg.CORBA.NO_IMPLEMENT();
  1022     /**
  1023      * Creates a <code>TypeCode</code> object for an IDL value box.
  1025      * @param id                 the logical id for the value type
  1026      * @param name               the name of the value type
  1027      * @param boxed_type         the TypeCode for the type
  1028      * @return                   the requested TypeCode
  1029      */
  1030     public org.omg.CORBA.TypeCode create_value_box_tc(String id,
  1031                                                       String name,
  1032                                                       TypeCode boxed_type)
  1034         // implemented in subclass
  1035         throw new org.omg.CORBA.NO_IMPLEMENT();
  1038     // orbos 98-01-18: Objects By Value -- end
  1040     /**
  1041      * Creates an IDL <code>Any</code> object initialized to
  1042      * contain a <code>Typecode</code> object whose <code>kind</code> field
  1043      * is set to <code>TCKind.tc_null</code>.
  1045      * @return          a newly-created <code>Any</code> object
  1046      */
  1047     abstract public Any create_any();
  1052     /**
  1053      * Retrieves a <code>Current</code> object.
  1054      * The <code>Current</code> interface is used to manage thread-specific
  1055      * information for use by services such as transactions and security.
  1057      * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package
  1058      *      comments for unimplemented features</a>
  1060      * @return          a newly-created <code>Current</code> object
  1061      * @deprecated      use <code>resolve_initial_references</code>.
  1062      */
  1063     @Deprecated
  1064     public org.omg.CORBA.Current get_current()
  1066         throw new org.omg.CORBA.NO_IMPLEMENT();
  1069     /**
  1070      * This operation blocks the current thread until the ORB has
  1071      * completed the shutdown process, initiated when some thread calls
  1072      * <code>shutdown</code>. It may be used by multiple threads which
  1073      * get all notified when the ORB shuts down.
  1075      */
  1076     public void run()
  1078         throw new org.omg.CORBA.NO_IMPLEMENT();
  1081     /**
  1082      * Instructs the ORB to shut down, which causes all
  1083      * object adapters to shut down, in preparation for destruction.<br>
  1084      * If the <code>wait_for_completion</code> parameter
  1085      * is true, this operation blocks until all ORB processing (including
  1086      * processing of currently executing requests, object deactivation,
  1087      * and other object adapter operations) has completed.
  1088      * If an application does this in a thread that is currently servicing
  1089      * an invocation, the <code>BAD_INV_ORDER</code> system exception
  1090      * will be thrown with the OMG minor code 3,
  1091      * since blocking would result in a deadlock.<br>
  1092      * If the <code>wait_for_completion</code> parameter is <code>FALSE</code>,
  1093      * then shutdown may not have completed upon return.<p>
  1094      * While the ORB is in the process of shutting down, the ORB operates as normal,
  1095      * servicing incoming and outgoing requests until all requests have been completed.
  1096      * Once an ORB has shutdown, only object reference management operations
  1097      * may be invoked on the ORB or any object reference obtained from it.
  1098      * An application may also invoke the <code>destroy</code> operation on the ORB itself.
  1099      * Invoking any other operation will throw the <code>BAD_INV_ORDER</code>
  1100      * system exception with the OMG minor code 4.<p>
  1101      * The <code>ORB.run</code> method will return after
  1102      * <code>shutdown</code> has been called.
  1104      * @param wait_for_completion <code>true</code> if the call
  1105      *        should block until the shutdown is complete;
  1106      *        <code>false</code> if it should return immediately
  1107      * @throws org.omg.CORBA.BAD_INV_ORDER if the current thread is servicing
  1108      *         an invocation
  1109      */
  1110     public void shutdown(boolean wait_for_completion)
  1112         throw new org.omg.CORBA.NO_IMPLEMENT();
  1115     /**
  1116      * Returns <code>true</code> if the ORB needs the main thread to
  1117      * perform some work, and <code>false</code> if the ORB does not
  1118      * need the main thread.
  1120      * @return <code>true</code> if there is work pending, meaning that the ORB
  1121      *         needs the main thread to perform some work; <code>false</code>
  1122      *         if there is no work pending and thus the ORB does not need the
  1123      *         main thread
  1125      */
  1126     public boolean work_pending()
  1128         throw new org.omg.CORBA.NO_IMPLEMENT();
  1131     /**
  1132      * Performs an implementation-dependent unit of work if called
  1133      * by the main thread. Otherwise it does nothing.
  1134      * The methods <code>work_pending</code> and <code>perform_work</code>
  1135      * can be used in
  1136      * conjunction to implement a simple polling loop that multiplexes
  1137      * the main thread among the ORB and other activities.
  1139      */
  1140     public void perform_work()
  1142         throw new org.omg.CORBA.NO_IMPLEMENT();
  1145     /**
  1146      * Used to obtain information about CORBA facilities and services
  1147      * that are supported by this ORB. The service type for which
  1148      * information is being requested is passed in as the in
  1149      * parameter <tt>service_type</tt>, the values defined by
  1150      * constants in the CORBA module. If service information is
  1151      * available for that type, that is returned in the out parameter
  1152      * <tt>service_info</tt>, and the operation returns the
  1153      * value <tt>true</tt>. If no information for the requested
  1154      * services type is available, the operation returns <tt>false</tt>
  1155      *  (i.e., the service is not supported by this ORB).
  1156      * <P>
  1157      * @param service_type a <code>short</code> indicating the
  1158      *        service type for which information is being requested
  1159      * @param service_info a <code>ServiceInformationHolder</code> object
  1160      *        that will hold the <code>ServiceInformation</code> object
  1161      *        produced by this method
  1162      * @return <code>true</code> if service information is available
  1163      *        for the <tt>service_type</tt>;
  1164      *         <tt>false</tt> if no information for the
  1165      *         requested services type is available
  1166      * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package
  1167      *      comments for unimplemented features</a>
  1168      */
  1169     public boolean get_service_information(short service_type,
  1170                                            ServiceInformationHolder service_info)
  1172         throw new org.omg.CORBA.NO_IMPLEMENT();
  1175     // orbos 98-01-18: Objects By Value -- begin
  1177     /**
  1178      * Creates a new <code>DynAny</code> object from the given
  1179      * <code>Any</code> object.
  1180      * <P>
  1181      * @param value the <code>Any</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>Any</code> object
  1185      * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package
  1186      *      comments for unimplemented features</a>
  1187      * @deprecated Use the new <a href="../DynamicAny/DynAnyFactory.html">DynAnyFactory</a> API instead
  1188      */
  1189     @Deprecated
  1190     public org.omg.CORBA.DynAny create_dyn_any(org.omg.CORBA.Any value)
  1192         throw new org.omg.CORBA.NO_IMPLEMENT();
  1195     /**
  1196      * Creates a basic <code>DynAny</code> object from the given
  1197      * <code>TypeCode</code> object.
  1198      * <P>
  1199      * @param type the <code>TypeCode</code> object from which to create a new
  1200      *        <code>DynAny</code> object
  1201      * @return the new <code>DynAny</code> object created from the given
  1202      *         <code>TypeCode</code> object
  1203      * @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given
  1204      *         <code>TypeCode</code> object is not consistent with the operation.
  1205      * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package
  1206      *      comments for unimplemented features</a>
  1207      * @deprecated Use the new <a href="../DynamicAny/DynAnyFactory.html">DynAnyFactory</a> API instead
  1208      */
  1209     @Deprecated
  1210     public org.omg.CORBA.DynAny create_basic_dyn_any(org.omg.CORBA.TypeCode type) throws org.omg.CORBA.ORBPackage.InconsistentTypeCode
  1212         throw new org.omg.CORBA.NO_IMPLEMENT();
  1215     /**
  1216      * Creates a new <code>DynStruct</code> object from the given
  1217      * <code>TypeCode</code> object.
  1218      * <P>
  1219      * @param type the <code>TypeCode</code> object from which to create a new
  1220      *        <code>DynStruct</code> object
  1221      * @return the new <code>DynStruct</code> object created from the given
  1222      *         <code>TypeCode</code> object
  1223      * @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given
  1224      *         <code>TypeCode</code> object is not consistent with the operation.
  1225      * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package
  1226      *      comments for unimplemented features</a>
  1227      * @deprecated Use the new <a href="../DynamicAny/DynAnyFactory.html">DynAnyFactory</a> API instead
  1228      */
  1229     @Deprecated
  1230     public org.omg.CORBA.DynStruct create_dyn_struct(org.omg.CORBA.TypeCode type) throws org.omg.CORBA.ORBPackage.InconsistentTypeCode
  1232         throw new org.omg.CORBA.NO_IMPLEMENT();
  1235     /**
  1236      * Creates a new <code>DynSequence</code> object from the given
  1237      * <code>TypeCode</code> object.
  1238      * <P>
  1239      * @param type the <code>TypeCode</code> object from which to create a new
  1240      *        <code>DynSequence</code> object
  1241      * @return the new <code>DynSequence</code> object created from the given
  1242      *         <code>TypeCode</code> object
  1243      * @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given
  1244      *         <code>TypeCode</code> object is not consistent with the operation.
  1245      * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package
  1246      *      comments for unimplemented features</a>
  1247      * @deprecated Use the new <a href="../DynamicAny/DynAnyFactory.html">DynAnyFactory</a> API instead
  1248      */
  1249     @Deprecated
  1250     public org.omg.CORBA.DynSequence create_dyn_sequence(org.omg.CORBA.TypeCode type) throws org.omg.CORBA.ORBPackage.InconsistentTypeCode
  1252         throw new org.omg.CORBA.NO_IMPLEMENT();
  1256     /**
  1257      * Creates a new <code>DynArray</code> object from the given
  1258      * <code>TypeCode</code> object.
  1259      * <P>
  1260      * @param type the <code>TypeCode</code> object from which to create a new
  1261      *        <code>DynArray</code> object
  1262      * @return the new <code>DynArray</code> object created from the given
  1263      *         <code>TypeCode</code> object
  1264      * @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given
  1265      *         <code>TypeCode</code> object is not consistent with the operation.
  1266      * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package
  1267      *      comments for unimplemented features</a>
  1268      * @deprecated Use the new <a href="../DynamicAny/DynAnyFactory.html">DynAnyFactory</a> API instead
  1269      */
  1270     @Deprecated
  1271     public org.omg.CORBA.DynArray create_dyn_array(org.omg.CORBA.TypeCode type) throws org.omg.CORBA.ORBPackage.InconsistentTypeCode
  1273         throw new org.omg.CORBA.NO_IMPLEMENT();
  1276     /**
  1277      * Creates a new <code>DynUnion</code> object from the given
  1278      * <code>TypeCode</code> object.
  1279      * <P>
  1280      * @param type the <code>TypeCode</code> object from which to create a new
  1281      *        <code>DynUnion</code> object
  1282      * @return the new <code>DynUnion</code> object created from the given
  1283      *         <code>TypeCode</code> object
  1284      * @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given
  1285      *         <code>TypeCode</code> object is not consistent with the operation.
  1286      * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package
  1287      *      comments for unimplemented features</a>
  1288      * @deprecated Use the new <a href="../DynamicAny/DynAnyFactory.html">DynAnyFactory</a> API instead
  1289      */
  1290     @Deprecated
  1291     public org.omg.CORBA.DynUnion create_dyn_union(org.omg.CORBA.TypeCode type) throws org.omg.CORBA.ORBPackage.InconsistentTypeCode
  1293         throw new org.omg.CORBA.NO_IMPLEMENT();
  1296     /**
  1297      * Creates a new <code>DynEnum</code> object from the given
  1298      * <code>TypeCode</code> object.
  1299      * <P>
  1300      * @param type the <code>TypeCode</code> object from which to create a new
  1301      *        <code>DynEnum</code> object
  1302      * @return the new <code>DynEnum</code> object created from the given
  1303      *         <code>TypeCode</code> object
  1304      * @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given
  1305      *         <code>TypeCode</code> object is not consistent with the operation.
  1306      * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package
  1307      *      comments for unimplemented features</a>
  1308      * @deprecated Use the new <a href="../DynamicAny/DynAnyFactory.html">DynAnyFactory</a> API instead
  1309      */
  1310     @Deprecated
  1311     public org.omg.CORBA.DynEnum create_dyn_enum(org.omg.CORBA.TypeCode type) throws org.omg.CORBA.ORBPackage.InconsistentTypeCode
  1313         throw new org.omg.CORBA.NO_IMPLEMENT();
  1316     /**
  1317     * Can be invoked to create new instances of policy objects
  1318     * of a specific type with specified initial state. If
  1319     * <tt>create_policy</tt> fails to instantiate a new Policy
  1320     * object due to its inability to interpret the requested type
  1321     * and content of the policy, it raises the <tt>PolicyError</tt>
  1322     * exception with the appropriate reason.
  1323     * @param type the <tt>PolicyType</tt> of the policy object to
  1324     *        be created
  1325     * @param val the value that will be used to set the initial
  1326     *        state of the <tt>Policy</tt> object that is created
  1327     * @return Reference to a newly created <tt>Policy</tt> object
  1328     *        of type specified by the <tt>type</tt> parameter and
  1329     *        initialized to a state specified by the <tt>val</tt>
  1330     *        parameter
  1331     * @throws <tt>org.omg.CORBA.PolicyError</tt> when the requested
  1332     *        policy is not supported or a requested initial state
  1333     *        for the policy is not supported.
  1334     */
  1335     public org.omg.CORBA.Policy create_policy(int type, org.omg.CORBA.Any val)
  1336         throws org.omg.CORBA.PolicyError
  1338         // Currently not implemented until PIORB.
  1339         throw new org.omg.CORBA.NO_IMPLEMENT();

mercurial