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