0001: /*
0002: * Copyright 1995-2005 Sun Microsystems, Inc. All Rights Reserved.
0003: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0004: *
0005: * This code is free software; you can redistribute it and/or modify it
0006: * under the terms of the GNU General Public License version 2 only, as
0007: * published by the Free Software Foundation. Sun designates this
0008: * particular file as subject to the "Classpath" exception as provided
0009: * by Sun in the LICENSE file that accompanied this code.
0010: *
0011: * This code is distributed in the hope that it will be useful, but WITHOUT
0012: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0013: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0014: * version 2 for more details (a copy is included in the LICENSE file that
0015: * accompanied this code).
0016: *
0017: * You should have received a copy of the GNU General Public License version
0018: * 2 along with this work; if not, write to the Free Software Foundation,
0019: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0020: *
0021: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
0022: * CA 95054 USA or visit www.sun.com if you need additional information or
0023: * have any questions.
0024: */
0025:
0026: package org.omg.CORBA;
0027:
0028: import org.omg.CORBA.portable.*;
0029: import org.omg.CORBA.ORBPackage.InvalidName;
0030:
0031: import java.util.Properties;
0032: import java.applet.Applet;
0033: import java.io.File;
0034: import java.io.FileInputStream;
0035:
0036: import java.security.AccessController;
0037: import java.security.PrivilegedAction;
0038:
0039: /**
0040: * A class providing APIs for the CORBA Object Request Broker
0041: * features. The <code>ORB</code> class also provides
0042: * "pluggable ORB implementation" APIs that allow another vendor's ORB
0043: * implementation to be used.
0044: * <P>
0045: * An ORB makes it possible for CORBA objects to communicate
0046: * with each other by connecting objects making requests (clients) with
0047: * objects servicing requests (servers).
0048: * <P>
0049: *
0050: * The <code>ORB</code> class, which
0051: * encapsulates generic CORBA functionality, does the following:
0052: * (Note that items 5 and 6, which include most of the methods in
0053: * the class <code>ORB</code>, are typically used with the <code>Dynamic Invocation
0054: * Interface</code> (DII) and the <code>Dynamic Skeleton Interface</code>
0055: * (DSI).
0056: * These interfaces may be used by a developer directly, but
0057: * most commonly they are used by the ORB internally and are
0058: * not seen by the general programmer.)
0059: * <OL>
0060: * <li> initializes the ORB implementation by supplying values for
0061: * predefined properties and environmental parameters
0062: * <li> obtains initial object references to services such as
0063: * the NameService using the method <code>resolve_initial_references</code>
0064: * <li> converts object references to strings and back
0065: * <li> connects the ORB to a servant (an instance of a CORBA object
0066: * implementation) and disconnects the ORB from a servant
0067: * <li> creates objects such as
0068: * <ul>
0069: * <li><code>TypeCode</code>
0070: * <li><code>Any</code>
0071: * <li><code>NamedValue</code>
0072: * <li><code>Context</code>
0073: * <li><code>Environment</code>
0074: * <li>lists (such as <code>NVList</code>) containing these objects
0075: * </ul>
0076: * <li> sends multiple messages in the DII
0077: * </OL>
0078: *
0079: * <P>
0080: * The <code>ORB</code> class can be used to obtain references to objects
0081: * implemented anywhere on the network.
0082: * <P>
0083: * An application or applet gains access to the CORBA environment
0084: * by initializing itself into an <code>ORB</code> using one of
0085: * three <code>init</code> methods. Two of the three methods use the properties
0086: * (associations of a name with a value) shown in the
0087: * table below.<BR>
0088: * <TABLE BORDER=1 SUMMARY="Standard Java CORBA Properties">
0089: * <TR><TH>Property Name</TH> <TH>Property Value</TH></TR>
0090: * <CAPTION>Standard Java CORBA Properties:</CAPTION>
0091: * <TR><TD>org.omg.CORBA.ORBClass</TD>
0092: * <TD>class name of an ORB implementation</TD></TR>
0093: * <TR><TD>org.omg.CORBA.ORBSingletonClass</TD>
0094: * <TD>class name of the ORB returned by <code>init()</code></TD></TR>
0095: * </TABLE>
0096: * <P>
0097: * These properties allow a different vendor's <code>ORB</code>
0098: * implementation to be "plugged in."
0099: * <P>
0100: * When an ORB instance is being created, the class name of the ORB
0101: * implementation is located using
0102: * the following standard search order:<P>
0103: *
0104: * <OL>
0105: * <LI>check in Applet parameter or application string array, if any
0106: *
0107: * <LI>check in properties parameter, if any
0108: *
0109: * <LI>check in the System properties
0110: *
0111: * <LI>check in the orb.properties file located in the user.home
0112: * directory (if any)
0113: *
0114: * <LI>check in the orb.properties file located in the java.home/lib
0115: * directory (if any)
0116: *
0117: * <LI>fall back on a hardcoded default behavior (use the Java IDL
0118: * implementation)
0119: * </OL>
0120: * <P>
0121: * Note that Java IDL provides a default implementation for the
0122: * fully-functional ORB and for the Singleton ORB. When the method
0123: * <code>init</code> is given no parameters, the default Singleton
0124: * ORB is returned. When the method <code>init</code> is given parameters
0125: * but no ORB class is specified, the Java IDL ORB implementation
0126: * is returned.
0127: * <P>
0128: * The following code fragment creates an <code>ORB</code> object
0129: * initialized with the default ORB Singleton.
0130: * This ORB has a
0131: * restricted implementation to prevent malicious applets from doing
0132: * anything beyond creating typecodes.
0133: * It is called a singleton
0134: * because there is only one instance for an entire virtual machine.
0135: * <PRE>
0136: * ORB orb = ORB.init();
0137: * </PRE>
0138: * <P>
0139: * The following code fragment creates an <code>ORB</code> object
0140: * for an application. The parameter <code>args</code>
0141: * represents the arguments supplied to the application's <code>main</code>
0142: * method. Since the property specifies the ORB class to be
0143: * "SomeORBImplementation", the new ORB will be initialized with
0144: * that ORB implementation. If p had been null,
0145: * and the arguments had not specified an ORB class,
0146: * the new ORB would have been
0147: * initialized with the default Java IDL implementation.
0148: * <PRE>
0149: * Properties p = new Properties();
0150: * p.put("org.omg.CORBA.ORBClass", "SomeORBImplementation");
0151: * ORB orb = ORB.init(args, p);
0152: * </PRE>
0153: * <P>
0154: * The following code fragment creates an <code>ORB</code> object
0155: * for the applet supplied as the first parameter. If the given
0156: * applet does not specify an ORB class, the new ORB will be
0157: * initialized with the default Java IDL implementation.
0158: * <PRE>
0159: * ORB orb = ORB.init(myApplet, null);
0160: * </PRE>
0161: * <P>
0162: * An application or applet can be initialized in one or more ORBs.
0163: * ORB initialization is a bootstrap call into the CORBA world.
0164: * @version 1.70, 09/09/97
0165: * @since JDK1.2
0166: */
0167: abstract public class ORB {
0168:
0169: //
0170: // This is the ORB implementation used when nothing else is specified.
0171: // Whoever provides this class customizes this string to
0172: // point at their ORB implementation.
0173: //
0174: private static final String ORBClassKey = "org.omg.CORBA.ORBClass";
0175: private static final String ORBSingletonClassKey = "org.omg.CORBA.ORBSingletonClass";
0176:
0177: //
0178: // The last resort fallback ORB implementation classes in case
0179: // no ORB implementation class is dynamically configured through
0180: // properties or applet parameters. Change these values to
0181: // vendor-specific class names.
0182: //
0183: private static final String defaultORB = "com.sun.corba.se.impl.orb.ORBImpl";
0184: private static final String defaultORBSingleton = "com.sun.corba.se.impl.orb.ORBSingleton";
0185:
0186: //
0187: // The global instance of the singleton ORB implementation which
0188: // acts as a factory for typecodes for generated Helper classes.
0189: // TypeCodes should be immutable since they may be shared across
0190: // different security contexts (applets). There should be no way to
0191: // use a TypeCode as a storage depot for illicitly passing
0192: // information or Java objects between different security contexts.
0193: //
0194: static private ORB singleton;
0195:
0196: // Get System property
0197: private static String getSystemProperty(final String name) {
0198:
0199: // This will not throw a SecurityException because this
0200: // class was loaded from rt.jar using the bootstrap classloader.
0201: String propValue = (String) AccessController
0202: .doPrivileged(new PrivilegedAction() {
0203: public java.lang.Object run() {
0204: return System.getProperty(name);
0205: }
0206: });
0207:
0208: return propValue;
0209: }
0210:
0211: // Get property from orb.properties in either <user.home> or <java-home>/lib
0212: // directories.
0213: private static String getPropertyFromFile(final String name) {
0214: // This will not throw a SecurityException because this
0215: // class was loaded from rt.jar using the bootstrap classloader.
0216:
0217: String propValue = (String) AccessController
0218: .doPrivileged(new PrivilegedAction() {
0219: private Properties getFileProperties(String fileName) {
0220: try {
0221: File propFile = new File(fileName);
0222: if (!propFile.exists())
0223: return null;
0224:
0225: Properties props = new Properties();
0226: FileInputStream fis = new FileInputStream(
0227: propFile);
0228: try {
0229: props.load(fis);
0230: } finally {
0231: fis.close();
0232: }
0233:
0234: return props;
0235: } catch (Exception exc) {
0236: return null;
0237: }
0238: }
0239:
0240: public java.lang.Object run() {
0241: String userHome = System
0242: .getProperty("user.home");
0243: String fileName = userHome + File.separator
0244: + "orb.properties";
0245: Properties props = getFileProperties(fileName);
0246:
0247: if (props != null) {
0248: String value = props.getProperty(name);
0249: if (value != null)
0250: return value;
0251: }
0252:
0253: String javaHome = System
0254: .getProperty("java.home");
0255: fileName = javaHome + File.separator + "lib"
0256: + File.separator + "orb.properties";
0257: props = getFileProperties(fileName);
0258:
0259: if (props == null)
0260: return null;
0261: else
0262: return props.getProperty(name);
0263: }
0264: });
0265:
0266: return propValue;
0267: }
0268:
0269: /**
0270: * Returns the <code>ORB</code> singleton object. This method always returns the
0271: * same ORB instance, which is an instance of the class described by the
0272: * <code>org.omg.CORBA.ORBSingletonClass</code> system property.
0273: * <P>
0274: * This no-argument version of the method <code>init</code> is used primarily
0275: * as a factory for <code>TypeCode</code> objects, which are used by
0276: * <code>Helper</code> classes to implement the method <code>type</code>.
0277: * It is also used to create <code>Any</code> objects that are used to
0278: * describe <code>union</code> labels (as part of creating a <code>
0279: * TypeCode</code> object for a <code>union</code>).
0280: * <P>
0281: * This method is not intended to be used by applets, and in the event
0282: * that it is called in an applet environment, the ORB it returns
0283: * is restricted so that it can be used only as a factory for
0284: * <code>TypeCode</code> objects. Any <code>TypeCode</code> objects
0285: * it produces can be safely shared among untrusted applets.
0286: * <P>
0287: * If an ORB is created using this method from an applet,
0288: * a system exception will be thrown if
0289: * methods other than those for
0290: * creating <code>TypeCode</code> objects are invoked.
0291: *
0292: * @return the singleton ORB
0293: */
0294: public static ORB init() {
0295: if (singleton == null) {
0296: String className = getSystemProperty(ORBSingletonClassKey);
0297: if (className == null)
0298: className = getPropertyFromFile(ORBSingletonClassKey);
0299: if (className == null)
0300: className = defaultORBSingleton;
0301:
0302: singleton = create_impl(className);
0303: }
0304: return singleton;
0305: }
0306:
0307: private static ORB create_impl(String className) {
0308:
0309: ClassLoader cl = Thread.currentThread().getContextClassLoader();
0310: if (cl == null)
0311: cl = ClassLoader.getSystemClassLoader();
0312:
0313: try {
0314: return (ORB) Class.forName(className, true, cl)
0315: .newInstance();
0316: } catch (Throwable ex) {
0317: SystemException systemException = new INITIALIZE(
0318: "can't instantiate default ORB implementation "
0319: + className);
0320: systemException.initCause(ex);
0321: throw systemException;
0322: }
0323: }
0324:
0325: /**
0326: * Creates a new <code>ORB</code> instance for a standalone
0327: * application. This method may be called from applications
0328: * only and returns a new fully functional <code>ORB</code> object
0329: * each time it is called.
0330: * @param args command-line arguments for the application's <code>main</code>
0331: * method; may be <code>null</code>
0332: * @param props application-specific properties; may be <code>null</code>
0333: * @return the newly-created ORB instance
0334: */
0335: public static ORB init(String[] args, Properties props) {
0336: //
0337: // Note that there is no standard command-line argument for
0338: // specifying the default ORB implementation. For an
0339: // application you can choose an implementation either by
0340: // setting the CLASSPATH to pick a different org.omg.CORBA
0341: // and it's baked-in ORB implementation default or by
0342: // setting an entry in the properties object or in the
0343: // system properties.
0344: //
0345: String className = null;
0346: ORB orb;
0347:
0348: if (props != null)
0349: className = props.getProperty(ORBClassKey);
0350: if (className == null)
0351: className = getSystemProperty(ORBClassKey);
0352: if (className == null)
0353: className = getPropertyFromFile(ORBClassKey);
0354: if (className == null)
0355: className = defaultORB;
0356:
0357: orb = create_impl(className);
0358: orb.set_parameters(args, props);
0359: return orb;
0360: }
0361:
0362: /**
0363: * Creates a new <code>ORB</code> instance for an applet. This
0364: * method may be called from applets only and returns a new
0365: * fully-functional <code>ORB</code> object each time it is called.
0366: * @param app the applet; may be <code>null</code>
0367: * @param props applet-specific properties; may be <code>null</code>
0368: * @return the newly-created ORB instance
0369: */
0370: public static ORB init(Applet app, Properties props) {
0371: String className;
0372: ORB orb;
0373:
0374: className = app.getParameter(ORBClassKey);
0375: if (className == null && props != null)
0376: className = props.getProperty(ORBClassKey);
0377: if (className == null)
0378: className = getSystemProperty(ORBClassKey);
0379: if (className == null)
0380: className = getPropertyFromFile(ORBClassKey);
0381: if (className == null)
0382: className = defaultORB;
0383:
0384: orb = create_impl(className);
0385: orb.set_parameters(app, props);
0386: return orb;
0387: }
0388:
0389: /**
0390: * Allows the ORB implementation to be initialized with the given
0391: * parameters and properties. This method, used in applications only,
0392: * is implemented by subclass ORB implementations and called
0393: * by the appropriate <code>init</code> method to pass in its parameters.
0394: *
0395: * @param args command-line arguments for the application's <code>main</code>
0396: * method; may be <code>null</code>
0397: * @param props application-specific properties; may be <code>null</code>
0398: */
0399: abstract protected void set_parameters(String[] args,
0400: Properties props);
0401:
0402: /**
0403: * Allows the ORB implementation to be initialized with the given
0404: * applet and parameters. This method, used in applets only,
0405: * is implemented by subclass ORB implementations and called
0406: * by the appropriate <code>init</code> method to pass in its parameters.
0407: *
0408: * @param app the applet; may be <code>null</code>
0409: * @param props applet-specific properties; may be <code>null</code>
0410: */
0411: abstract protected void set_parameters(Applet app, Properties props);
0412:
0413: /**
0414: * Connects the given servant object (a Java object that is
0415: * an instance of the server implementation class)
0416: * to the ORB. The servant class must
0417: * extend the <code>ImplBase</code> class corresponding to the interface that is
0418: * supported by the server. The servant must thus be a CORBA object
0419: * reference, and inherit from <code>org.omg.CORBA.Object</code>.
0420: * Servants created by the user can start receiving remote invocations
0421: * after the method <code>connect</code> has been called. A servant may also be
0422: * automatically and implicitly connected to the ORB if it is passed as
0423: * an IDL parameter in an IDL method invocation on a non-local object,
0424: * that is, if the servant object has to be marshalled and sent outside of the
0425: * process address space.
0426: * <P>
0427: * Calling the method <code>connect</code> has no effect
0428: * when the servant object is already connected to the ORB.
0429: * <P>
0430: * Deprecated by the OMG in favor of the Portable Object Adapter APIs.
0431: *
0432: * @param obj The servant object reference
0433: */
0434: public void connect(org.omg.CORBA.Object obj) {
0435: throw new NO_IMPLEMENT();
0436: }
0437:
0438: /**
0439: * Destroys the ORB so that its resources can be reclaimed.
0440: * Any operation invoked on a destroyed ORB reference will throw the
0441: * <code>OBJECT_NOT_EXIST</code> exception.
0442: * Once an ORB has been destroyed, another call to <code>init</code>
0443: * with the same ORBid will return a reference to a newly constructed ORB.<p>
0444: * If <code>destroy</code> is called on an ORB that has not been shut down,
0445: * it will start the shut down process and block until the ORB has shut down
0446: * before it destroys the ORB.<br>
0447: * If an application calls <code>destroy</code> in a thread that is currently servicing
0448: * an invocation, the <code>BAD_INV_ORDER</code> system exception will be thrown
0449: * with the OMG minor code 3, since blocking would result in a deadlock.<p>
0450: * For maximum portability and to avoid resource leaks, an application should
0451: * always call <code>shutdown</code> and <code>destroy</code>
0452: * on all ORB instances before exiting.
0453: *
0454: * @throws org.omg.CORBA.BAD_INV_ORDER if the current thread is servicing an invocation
0455: */
0456: public void destroy() {
0457: throw new NO_IMPLEMENT();
0458: }
0459:
0460: /**
0461: * Disconnects the given servant object from the ORB. After this method returns,
0462: * the ORB will reject incoming remote requests for the disconnected
0463: * servant and will send the exception
0464: * <code>org.omg.CORBA.OBJECT_NOT_EXIST</code> back to the
0465: * remote client. Thus the object appears to be destroyed from the
0466: * point of view of remote clients. Note, however, that local requests issued
0467: * using the servant directly do not
0468: * pass through the ORB; hence, they will continue to be processed by the
0469: * servant.
0470: * <P>
0471: * Calling the method <code>disconnect</code> has no effect
0472: * if the servant is not connected to the ORB.
0473: * <P>
0474: * Deprecated by the OMG in favor of the Portable Object Adapter APIs.
0475: *
0476: * @param obj The servant object to be disconnected from the ORB
0477: */
0478: public void disconnect(org.omg.CORBA.Object obj) {
0479: throw new NO_IMPLEMENT();
0480: }
0481:
0482: //
0483: // ORB method implementations.
0484: //
0485: // We are trying to accomplish 2 things at once in this class.
0486: // It can act as a default ORB implementation front-end,
0487: // creating an actual ORB implementation object which is a
0488: // subclass of this ORB class and then delegating the method
0489: // implementations.
0490: //
0491: // To accomplish the delegation model, the 'delegate' private instance
0492: // variable is set if an instance of this class is created directly.
0493: //
0494:
0495: /**
0496: * Returns a list of the initially available CORBA object references,
0497: * such as "NameService" and "InterfaceRepository".
0498: *
0499: * @return an array of <code>String</code> objects that represent
0500: * the object references for CORBA services
0501: * that are initially available with this ORB
0502: */
0503: abstract public String[] list_initial_services();
0504:
0505: /**
0506: * Resolves a specific object reference from the set of available
0507: * initial service names.
0508: *
0509: * @param object_name the name of the initial service as a string
0510: * @return the object reference associated with the given name
0511: * @exception InvalidName if the given name is not associated with a
0512: * known service
0513: */
0514: abstract public org.omg.CORBA.Object resolve_initial_references(
0515: String object_name) throws InvalidName;
0516:
0517: /**
0518: * Converts the given CORBA object reference to a string.
0519: * Note that the format of this string is predefined by IIOP, allowing
0520: * strings generated by a different ORB to be converted back into an object
0521: * reference.
0522: * <P>
0523: * The resulting <code>String</code> object may be stored or communicated
0524: * in any way that a <code>String</code> object can be manipulated.
0525: *
0526: * @param obj the object reference to stringify
0527: * @return the string representing the object reference
0528: */
0529: abstract public String object_to_string(org.omg.CORBA.Object obj);
0530:
0531: /**
0532: * Converts a string produced by the method <code>object_to_string</code>
0533: * back to a CORBA object reference.
0534: *
0535: * @param str the string to be converted back to an object reference. It must
0536: * be the result of converting an object reference to a string using the
0537: * method <code>object_to_string</code>.
0538: * @return the object reference
0539: */
0540: abstract public org.omg.CORBA.Object string_to_object(String str);
0541:
0542: /**
0543: * Allocates an <code>NVList</code> with (probably) enough
0544: * space for the specified number of <code>NamedValue</code> objects.
0545: * Note that the specified size is only a hint to help with
0546: * storage allocation and does not imply the maximum size of the list.
0547: *
0548: * @param count suggested number of <code>NamedValue</code> objects for
0549: * which to allocate space
0550: * @return the newly-created <code>NVList</code>
0551: *
0552: * @see NVList
0553: */
0554: abstract public NVList create_list(int count);
0555:
0556: /**
0557: * Creates an <code>NVList</code> initialized with argument
0558: * descriptions for the operation described in the given
0559: * <code>OperationDef</code> object. This <code>OperationDef</code> object
0560: * is obtained from an Interface Repository. The arguments in the
0561: * returned <code>NVList</code> object are in the same order as in the
0562: * original IDL operation definition, which makes it possible for the list
0563: * to be used in dynamic invocation requests.
0564: *
0565: * @param oper the <code>OperationDef</code> object to use to create the list
0566: * @return a newly-created <code>NVList</code> object containing
0567: * descriptions of the arguments to the method described in the given
0568: * <code>OperationDef</code> object
0569: *
0570: * @see NVList
0571: */
0572: public NVList create_operation_list(org.omg.CORBA.Object oper) {
0573: // If we came here, it means that the actual ORB implementation
0574: // did not have a create_operation_list(...CORBA.Object oper) method,
0575: // so lets check if it has a create_operation_list(OperationDef oper)
0576: // method.
0577: try {
0578: // First try to load the OperationDef class
0579: String opDefClassName = "org.omg.CORBA.OperationDef";
0580: Class opDefClass = null;
0581:
0582: ClassLoader cl = Thread.currentThread()
0583: .getContextClassLoader();
0584: if (cl == null)
0585: cl = ClassLoader.getSystemClassLoader();
0586: // if this throws a ClassNotFoundException, it will be caught below.
0587: opDefClass = Class.forName(opDefClassName, true, cl);
0588:
0589: // OK, we loaded OperationDef. Now try to get the
0590: // create_operation_list(OperationDef oper) method.
0591: Class[] argc = { opDefClass };
0592: java.lang.reflect.Method meth = this .getClass().getMethod(
0593: "create_operation_list", argc);
0594:
0595: // OK, the method exists, so invoke it and be happy.
0596: Object[] argx = { oper };
0597: return (org.omg.CORBA.NVList) meth.invoke(this , argx);
0598: } catch (java.lang.reflect.InvocationTargetException exs) {
0599: Throwable t = exs.getTargetException();
0600: if (t instanceof Error) {
0601: throw (Error) t;
0602: } else if (t instanceof RuntimeException) {
0603: throw (RuntimeException) t;
0604: } else {
0605: throw new org.omg.CORBA.NO_IMPLEMENT();
0606: }
0607: } catch (RuntimeException ex) {
0608: throw ex;
0609: } catch (Exception exr) {
0610: throw new org.omg.CORBA.NO_IMPLEMENT();
0611: }
0612: }
0613:
0614: /**
0615: * Creates a <code>NamedValue</code> object
0616: * using the given name, value, and argument mode flags.
0617: * <P>
0618: * A <code>NamedValue</code> object serves as (1) a parameter or return
0619: * value or (2) a context property.
0620: * It may be used by itself or
0621: * as an element in an <code>NVList</code> object.
0622: *
0623: * @param s the name of the <code>NamedValue</code> object
0624: * @param any the <code>Any</code> value to be inserted into the
0625: * <code>NamedValue</code> object
0626: * @param flags the argument mode flags for the <code>NamedValue</code>: one of
0627: * <code>ARG_IN.value</code>, <code>ARG_OUT.value</code>,
0628: * or <code>ARG_INOUT.value</code>.
0629: *
0630: * @return the newly-created <code>NamedValue</code> object
0631: * @see NamedValue
0632: */
0633: abstract public NamedValue create_named_value(String s, Any any,
0634: int flags);
0635:
0636: /**
0637: * Creates an empty <code>ExceptionList</code> object.
0638: *
0639: * @return the newly-created <code>ExceptionList</code> object
0640: */
0641: abstract public ExceptionList create_exception_list();
0642:
0643: /**
0644: * Creates an empty <code>ContextList</code> object.
0645: *
0646: * @return the newly-created <code>ContextList</code> object
0647: * @see ContextList
0648: * @see Context
0649: */
0650: abstract public ContextList create_context_list();
0651:
0652: /**
0653: * Gets the default <code>Context</code> object.
0654: *
0655: * @return the default <code>Context</code> object
0656: * @see Context
0657: */
0658: abstract public Context get_default_context();
0659:
0660: /**
0661: * Creates an <code>Environment</code> object.
0662: *
0663: * @return the newly-created <code>Environment</code> object
0664: * @see Environment
0665: */
0666: abstract public Environment create_environment();
0667:
0668: /**
0669: * Creates a new <code>org.omg.CORBA.portable.OutputStream</code> into which
0670: * IDL method parameters can be marshalled during method invocation.
0671: * @return the newly-created
0672: * <code>org.omg.CORBA.portable.OutputStream</code> object
0673: */
0674: abstract public org.omg.CORBA.portable.OutputStream create_output_stream();
0675:
0676: /**
0677: * Sends multiple dynamic (DII) requests asynchronously without expecting
0678: * any responses. Note that oneway invocations are not guaranteed to
0679: * reach the server.
0680: *
0681: * @param req an array of request objects
0682: */
0683: abstract public void send_multiple_requests_oneway(Request[] req);
0684:
0685: /**
0686: * Sends multiple dynamic (DII) requests asynchronously.
0687: *
0688: * @param req an array of <code>Request</code> objects
0689: */
0690: abstract public void send_multiple_requests_deferred(Request[] req);
0691:
0692: /**
0693: * Finds out if any of the deferred (asynchronous) invocations have
0694: * a response yet.
0695: * @return <code>true</code> if there is a response available;
0696: * <code> false</code> otherwise
0697: */
0698: abstract public boolean poll_next_response();
0699:
0700: /**
0701: * Gets the next <code>Request</code> instance for which a response
0702: * has been received.
0703: *
0704: * @return the next <code>Request</code> object ready with a response
0705: * @exception WrongTransaction if the method <code>get_next_response</code>
0706: * is called from a transaction scope different
0707: * from the one from which the original request was sent. See the
0708: * OMG Transaction Service specification for details.
0709: */
0710: abstract public Request get_next_response() throws WrongTransaction;
0711:
0712: /**
0713: * Retrieves the <code>TypeCode</code> object that represents
0714: * the given primitive IDL type.
0715: *
0716: * @param tcKind the <code>TCKind</code> instance corresponding to the
0717: * desired primitive type
0718: * @return the requested <code>TypeCode</code> object
0719: */
0720: abstract public TypeCode get_primitive_tc(TCKind tcKind);
0721:
0722: /**
0723: * Creates a <code>TypeCode</code> object representing an IDL <code>struct</code>.
0724: * The <code>TypeCode</code> object is initialized with the given id,
0725: * name, and members.
0726: *
0727: * @param id the repository id for the <code>struct</code>
0728: * @param name the name of the <code>struct</code>
0729: * @param members an array describing the members of the <code>struct</code>
0730: * @return a newly-created <code>TypeCode</code> object describing
0731: * an IDL <code>struct</code>
0732: */
0733: abstract public TypeCode create_struct_tc(String id, String name,
0734: StructMember[] members);
0735:
0736: /**
0737: * Creates a <code>TypeCode</code> object representing an IDL <code>union</code>.
0738: * The <code>TypeCode</code> object is initialized with the given id,
0739: * name, discriminator type, and members.
0740: *
0741: * @param id the repository id of the <code>union</code>
0742: * @param name the name of the <code>union</code>
0743: * @param discriminator_type the type of the <code>union</code> discriminator
0744: * @param members an array describing the members of the <code>union</code>
0745: * @return a newly-created <code>TypeCode</code> object describing
0746: * an IDL <code>union</code>
0747: */
0748: abstract public TypeCode create_union_tc(String id, String name,
0749: TypeCode discriminator_type, UnionMember[] members);
0750:
0751: /**
0752: * Creates a <code>TypeCode</code> object representing an IDL <code>enum</code>.
0753: * The <code>TypeCode</code> object is initialized with the given id,
0754: * name, and members.
0755: *
0756: * @param id the repository id for the <code>enum</code>
0757: * @param name the name for the <code>enum</code>
0758: * @param members an array describing the members of the <code>enum</code>
0759: * @return a newly-created <code>TypeCode</code> object describing
0760: * an IDL <code>enum</code>
0761: */
0762: abstract public TypeCode create_enum_tc(String id, String name,
0763: String[] members);
0764:
0765: /**
0766: * Creates a <code>TypeCode</code> object representing an IDL <code>alias</code>
0767: * (<code>typedef</code>).
0768: * The <code>TypeCode</code> object is initialized with the given id,
0769: * name, and original type.
0770: *
0771: * @param id the repository id for the alias
0772: * @param name the name for the alias
0773: * @param original_type
0774: * the <code>TypeCode</code> object describing the original type
0775: * for which this is an alias
0776: * @return a newly-created <code>TypeCode</code> object describing
0777: * an IDL <code>alias</code>
0778: */
0779: abstract public TypeCode create_alias_tc(String id, String name,
0780: TypeCode original_type);
0781:
0782: /**
0783: * Creates a <code>TypeCode</code> object representing an IDL <code>exception</code>.
0784: * The <code>TypeCode</code> object is initialized with the given id,
0785: * name, and members.
0786: *
0787: * @param id the repository id for the <code>exception</code>
0788: * @param name the name for the <code>exception</code>
0789: * @param members an array describing the members of the <code>exception</code>
0790: * @return a newly-created <code>TypeCode</code> object describing
0791: * an IDL <code>exception</code>
0792: */
0793: abstract public TypeCode create_exception_tc(String id,
0794: String name, StructMember[] members);
0795:
0796: /**
0797: * Creates a <code>TypeCode</code> object representing an IDL <code>interface</code>.
0798: * The <code>TypeCode</code> object is initialized with the given id
0799: * and name.
0800: *
0801: * @param id the repository id for the interface
0802: * @param name the name for the interface
0803: * @return a newly-created <code>TypeCode</code> object describing
0804: * an IDL <code>interface</code>
0805: */
0806:
0807: abstract public TypeCode create_interface_tc(String id, String name);
0808:
0809: /**
0810: * Creates a <code>TypeCode</code> object representing a bounded IDL
0811: * <code>string</code>.
0812: * The <code>TypeCode</code> object is initialized with the given bound,
0813: * which represents the maximum length of the string. Zero indicates
0814: * that the string described by this type code is unbounded.
0815: *
0816: * @param bound the bound for the <code>string</code>; cannot be negative
0817: * @return a newly-created <code>TypeCode</code> object describing
0818: * a bounded IDL <code>string</code>
0819: * @exception BAD_PARAM if bound is a negative value
0820: */
0821:
0822: abstract public TypeCode create_string_tc(int bound);
0823:
0824: /**
0825: * Creates a <code>TypeCode</code> object representing a bounded IDL
0826: * <code>wstring</code> (wide string).
0827: * The <code>TypeCode</code> object is initialized with the given bound,
0828: * which represents the maximum length of the wide string. Zero indicates
0829: * that the string described by this type code is unbounded.
0830: *
0831: * @param bound the bound for the <code>wstring</code>; cannot be negative
0832: * @return a newly-created <code>TypeCode</code> object describing
0833: * a bounded IDL <code>wstring</code>
0834: * @exception BAD_PARAM if bound is a negative value
0835: */
0836: abstract public TypeCode create_wstring_tc(int bound);
0837:
0838: /**
0839: * Creates a <code>TypeCode</code> object representing an IDL <code>sequence</code>.
0840: * The <code>TypeCode</code> object is initialized with the given bound and
0841: * element type.
0842: *
0843: * @param bound the bound for the <code>sequence</code>, 0 if unbounded
0844: * @param element_type
0845: * the <code>TypeCode</code> object describing the elements
0846: * contained in the <code>sequence</code>
0847: * @return a newly-created <code>TypeCode</code> object describing
0848: * an IDL <code>sequence</code>
0849: */
0850: abstract public TypeCode create_sequence_tc(int bound,
0851: TypeCode element_type);
0852:
0853: /**
0854: * Creates a <code>TypeCode</code> object representing a
0855: * a recursive IDL <code>sequence</code>.
0856: * <P>
0857: * For the IDL <code>struct</code> Node in following code fragment,
0858: * the offset parameter for creating its sequence would be 1:
0859: * <PRE>
0860: * Struct Node {
0861: * long value;
0862: * Sequence <Node> subnodes;
0863: * };
0864: * </PRE>
0865: *
0866: * @param bound the bound for the sequence, 0 if unbounded
0867: * @param offset the index to the enclosing <code>TypeCode</code> object
0868: * that describes the elements of this sequence
0869: * @return a newly-created <code>TypeCode</code> object describing
0870: * a recursive sequence
0871: * @deprecated Use a combination of create_recursive_tc and create_sequence_tc instead
0872: * @see #create_recursive_tc(String) create_recursive_tc
0873: * @see #create_sequence_tc(int, TypeCode) create_sequence_tc
0874: */
0875: @Deprecated
0876: abstract public TypeCode create_recursive_sequence_tc(int bound,
0877: int offset);
0878:
0879: /**
0880: * Creates a <code>TypeCode</code> object representing an IDL <code>array</code>.
0881: * The <code>TypeCode</code> object is initialized with the given length and
0882: * element type.
0883: *
0884: * @param length the length of the <code>array</code>
0885: * @param element_type a <code>TypeCode</code> object describing the type
0886: * of element contained in the <code>array</code>
0887: * @return a newly-created <code>TypeCode</code> object describing
0888: * an IDL <code>array</code>
0889: */
0890: abstract public TypeCode create_array_tc(int length,
0891: TypeCode element_type);
0892:
0893: /**
0894: * Create a <code>TypeCode</code> object for an IDL native type.
0895: *
0896: * @param id the logical id for the native type.
0897: * @param name the name of the native type.
0898: * @return the requested TypeCode.
0899: */
0900: public org.omg.CORBA.TypeCode create_native_tc(String id,
0901: String name) {
0902: throw new org.omg.CORBA.NO_IMPLEMENT();
0903: }
0904:
0905: /**
0906: * Create a <code>TypeCode</code> object for an IDL abstract interface.
0907: *
0908: * @param id the logical id for the abstract interface type.
0909: * @param name the name of the abstract interface type.
0910: * @return the requested TypeCode.
0911: */
0912: public org.omg.CORBA.TypeCode create_abstract_interface_tc(
0913: String id, String name) {
0914: throw new org.omg.CORBA.NO_IMPLEMENT();
0915: }
0916:
0917: /**
0918: * Create a <code>TypeCode</code> object for an IDL fixed type.
0919: *
0920: * @param digits specifies the total number of decimal digits in the number
0921: * and must be from 1 to 31 inclusive.
0922: * @param scale specifies the position of the decimal point.
0923: * @return the requested TypeCode.
0924: */
0925: public org.omg.CORBA.TypeCode create_fixed_tc(short digits,
0926: short scale) {
0927: throw new org.omg.CORBA.NO_IMPLEMENT();
0928: }
0929:
0930: // orbos 98-01-18: Objects By Value -- begin
0931:
0932: /**
0933: * Create a <code>TypeCode</code> object for an IDL value type.
0934: * The concrete_base parameter is the TypeCode for the immediate
0935: * concrete valuetype base of the valuetype for which the TypeCode
0936: * is being created.
0937: * It may be null if the valuetype does not have a concrete base.
0938: *
0939: * @param id the logical id for the value type.
0940: * @param name the name of the value type.
0941: * @param type_modifier one of the value type modifier constants:
0942: * VM_NONE, VM_CUSTOM, VM_ABSTRACT or VM_TRUNCATABLE
0943: * @param concrete_base a <code>TypeCode</code> object
0944: * describing the concrete valuetype base
0945: * @param members an array containing the members of the value type
0946: * @return the requested TypeCode
0947: */
0948: public org.omg.CORBA.TypeCode create_value_tc(String id,
0949: String name, short type_modifier, TypeCode concrete_base,
0950: ValueMember[] members) {
0951: throw new org.omg.CORBA.NO_IMPLEMENT();
0952: }
0953:
0954: /**
0955: * Create a recursive <code>TypeCode</code> object which
0956: * serves as a placeholder for a concrete TypeCode during the process of creating
0957: * TypeCodes which contain recursion. The id parameter specifies the repository id of
0958: * the type for which the recursive TypeCode is serving as a placeholder. Once the
0959: * recursive TypeCode has been properly embedded in the enclosing TypeCode which
0960: * corresponds to the specified repository id, it will function as a normal TypeCode.
0961: * Invoking operations on the recursive TypeCode before it has been embedded in the
0962: * enclosing TypeCode will result in a <code>BAD_TYPECODE</code> exception.
0963: * <P>
0964: * For example, the following IDL type declaration contains recursion:
0965: * <PRE>
0966: * Struct Node {
0967: * Sequence<Node> subnodes;
0968: * };
0969: * </PRE>
0970: * <P>
0971: * To create a TypeCode for struct Node, you would invoke the TypeCode creation
0972: * operations as shown below:
0973: * <PRE>
0974: * String nodeID = "IDL:Node:1.0";
0975: * TypeCode recursiveSeqTC = orb.create_sequence_tc(0, orb.create_recursive_tc(nodeID));
0976: * StructMember[] members = { new StructMember("subnodes", recursiveSeqTC, null) };
0977: * TypeCode structNodeTC = orb.create_struct_tc(nodeID, "Node", members);
0978: * </PRE>
0979: * <P>
0980: * Also note that the following is an illegal IDL type declaration:
0981: * <PRE>
0982: * Struct Node {
0983: * Node next;
0984: * };
0985: * </PRE>
0986: * <P>
0987: * Recursive types can only appear within sequences which can be empty.
0988: * That way marshaling problems, when transmitting the struct in an Any, are avoided.
0989: * <P>
0990: * @param id the logical id of the referenced type
0991: * @return the requested TypeCode
0992: */
0993: public org.omg.CORBA.TypeCode create_recursive_tc(String id) {
0994: // implemented in subclass
0995: throw new org.omg.CORBA.NO_IMPLEMENT();
0996: }
0997:
0998: /**
0999: * Creates a <code>TypeCode</code> object for an IDL value box.
1000: *
1001: * @param id the logical id for the value type
1002: * @param name the name of the value type
1003: * @param boxed_type the TypeCode for the type
1004: * @return the requested TypeCode
1005: */
1006: public org.omg.CORBA.TypeCode create_value_box_tc(String id,
1007: String name, TypeCode boxed_type) {
1008: // implemented in subclass
1009: throw new org.omg.CORBA.NO_IMPLEMENT();
1010: }
1011:
1012: // orbos 98-01-18: Objects By Value -- end
1013:
1014: /**
1015: * Creates an IDL <code>Any</code> object initialized to
1016: * contain a <code>Typecode</code> object whose <code>kind</code> field
1017: * is set to <code>TCKind.tc_null</code>.
1018: *
1019: * @return a newly-created <code>Any</code> object
1020: */
1021: abstract public Any create_any();
1022:
1023: /**
1024: * Retrieves a <code>Current</code> object.
1025: * The <code>Current</code> interface is used to manage thread-specific
1026: * information for use by services such as transactions and security.
1027: *
1028: * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package
1029: * comments for unimplemented features</a>
1030: *
1031: * @return a newly-created <code>Current</code> object
1032: * @deprecated use <code>resolve_initial_references</code>.
1033: */
1034: @Deprecated
1035: public org.omg.CORBA.Current get_current() {
1036: throw new org.omg.CORBA.NO_IMPLEMENT();
1037: }
1038:
1039: /**
1040: * This operation blocks the current thread until the ORB has
1041: * completed the shutdown process, initiated when some thread calls
1042: * <code>shutdown</code>. It may be used by multiple threads which
1043: * get all notified when the ORB shuts down.
1044: *
1045: */
1046: public void run() {
1047: throw new org.omg.CORBA.NO_IMPLEMENT();
1048: }
1049:
1050: /**
1051: * Instructs the ORB to shut down, which causes all
1052: * object adapters to shut down, in preparation for destruction.<br>
1053: * If the <code>wait_for_completion</code> parameter
1054: * is true, this operation blocks until all ORB processing (including
1055: * processing of currently executing requests, object deactivation,
1056: * and other object adapter operations) has completed.
1057: * If an application does this in a thread that is currently servicing
1058: * an invocation, the <code>BAD_INV_ORDER</code> system exception
1059: * will be thrown with the OMG minor code 3,
1060: * since blocking would result in a deadlock.<br>
1061: * If the <code>wait_for_completion</code> parameter is <code>FALSE</code>,
1062: * then shutdown may not have completed upon return.<p>
1063: * While the ORB is in the process of shutting down, the ORB operates as normal,
1064: * servicing incoming and outgoing requests until all requests have been completed.
1065: * Once an ORB has shutdown, only object reference management operations
1066: * may be invoked on the ORB or any object reference obtained from it.
1067: * An application may also invoke the <code>destroy</code> operation on the ORB itself.
1068: * Invoking any other operation will throw the <code>BAD_INV_ORDER</code>
1069: * system exception with the OMG minor code 4.<p>
1070: * The <code>ORB.run</code> method will return after
1071: * <code>shutdown</code> has been called.
1072: *
1073: * @param wait_for_completion <code>true</code> if the call
1074: * should block until the shutdown is complete;
1075: * <code>false</code> if it should return immediately
1076: * @throws org.omg.CORBA.BAD_INV_ORDER if the current thread is servicing
1077: * an invocation
1078: */
1079: public void shutdown(boolean wait_for_completion) {
1080: throw new org.omg.CORBA.NO_IMPLEMENT();
1081: }
1082:
1083: /**
1084: * Returns <code>true</code> if the ORB needs the main thread to
1085: * perform some work, and <code>false</code> if the ORB does not
1086: * need the main thread.
1087: *
1088: * @return <code>true</code> if there is work pending, meaning that the ORB
1089: * needs the main thread to perform some work; <code>false</code>
1090: * if there is no work pending and thus the ORB does not need the
1091: * main thread
1092: *
1093: */
1094: public boolean work_pending() {
1095: throw new org.omg.CORBA.NO_IMPLEMENT();
1096: }
1097:
1098: /**
1099: * Performs an implementation-dependent unit of work if called
1100: * by the main thread. Otherwise it does nothing.
1101: * The methods <code>work_pending</code> and <code>perform_work</code>
1102: * can be used in
1103: * conjunction to implement a simple polling loop that multiplexes
1104: * the main thread among the ORB and other activities.
1105: *
1106: */
1107: public void perform_work() {
1108: throw new org.omg.CORBA.NO_IMPLEMENT();
1109: }
1110:
1111: /**
1112: * Used to obtain information about CORBA facilities and services
1113: * that are supported by this ORB. The service type for which
1114: * information is being requested is passed in as the in
1115: * parameter <tt>service_type</tt>, the values defined by
1116: * constants in the CORBA module. If service information is
1117: * available for that type, that is returned in the out parameter
1118: * <tt>service_info</tt>, and the operation returns the
1119: * value <tt>true</tt>. If no information for the requested
1120: * services type is available, the operation returns <tt>false</tt>
1121: * (i.e., the service is not supported by this ORB).
1122: * <P>
1123: * @param service_type a <code>short</code> indicating the
1124: * service type for which information is being requested
1125: * @param service_info a <code>ServiceInformationHolder</code> object
1126: * that will hold the <code>ServiceInformation</code> object
1127: * produced by this method
1128: * @return <code>true</code> if service information is available
1129: * for the <tt>service_type</tt>;
1130: * <tt>false</tt> if no information for the
1131: * requested services type is available
1132: * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package
1133: * comments for unimplemented features</a>
1134: */
1135: public boolean get_service_information(short service_type,
1136: ServiceInformationHolder service_info) {
1137: throw new org.omg.CORBA.NO_IMPLEMENT();
1138: }
1139:
1140: // orbos 98-01-18: Objects By Value -- begin
1141:
1142: /**
1143: * Creates a new <code>DynAny</code> object from the given
1144: * <code>Any</code> object.
1145: * <P>
1146: * @param value the <code>Any</code> object from which to create a new
1147: * <code>DynAny</code> object
1148: * @return the new <code>DynAny</code> object created from the given
1149: * <code>Any</code> object
1150: * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package
1151: * comments for unimplemented features</a>
1152: * @deprecated Use the new <a href="../DynamicAny/DynAnyFactory.html">DynAnyFactory</a> API instead
1153: */
1154: @Deprecated
1155: public org.omg.CORBA.DynAny create_dyn_any(org.omg.CORBA.Any value) {
1156: throw new org.omg.CORBA.NO_IMPLEMENT();
1157: }
1158:
1159: /**
1160: * Creates a basic <code>DynAny</code> object from the given
1161: * <code>TypeCode</code> object.
1162: * <P>
1163: * @param type the <code>TypeCode</code> object from which to create a new
1164: * <code>DynAny</code> object
1165: * @return the new <code>DynAny</code> object created from the given
1166: * <code>TypeCode</code> object
1167: * @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given
1168: * <code>TypeCode</code> object is not consistent with the operation.
1169: * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package
1170: * comments for unimplemented features</a>
1171: * @deprecated Use the new <a href="../DynamicAny/DynAnyFactory.html">DynAnyFactory</a> API instead
1172: */
1173: @Deprecated
1174: public org.omg.CORBA.DynAny create_basic_dyn_any(
1175: org.omg.CORBA.TypeCode type)
1176: throws org.omg.CORBA.ORBPackage.InconsistentTypeCode {
1177: throw new org.omg.CORBA.NO_IMPLEMENT();
1178: }
1179:
1180: /**
1181: * Creates a new <code>DynStruct</code> object from the given
1182: * <code>TypeCode</code> object.
1183: * <P>
1184: * @param type the <code>TypeCode</code> object from which to create a new
1185: * <code>DynStruct</code> object
1186: * @return the new <code>DynStruct</code> object created from the given
1187: * <code>TypeCode</code> object
1188: * @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given
1189: * <code>TypeCode</code> object is not consistent with the operation.
1190: * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package
1191: * comments for unimplemented features</a>
1192: * @deprecated Use the new <a href="../DynamicAny/DynAnyFactory.html">DynAnyFactory</a> API instead
1193: */
1194: @Deprecated
1195: public org.omg.CORBA.DynStruct create_dyn_struct(
1196: org.omg.CORBA.TypeCode type)
1197: throws org.omg.CORBA.ORBPackage.InconsistentTypeCode {
1198: throw new org.omg.CORBA.NO_IMPLEMENT();
1199: }
1200:
1201: /**
1202: * Creates a new <code>DynSequence</code> object from the given
1203: * <code>TypeCode</code> object.
1204: * <P>
1205: * @param type the <code>TypeCode</code> object from which to create a new
1206: * <code>DynSequence</code> object
1207: * @return the new <code>DynSequence</code> object created from the given
1208: * <code>TypeCode</code> object
1209: * @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given
1210: * <code>TypeCode</code> object is not consistent with the operation.
1211: * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package
1212: * comments for unimplemented features</a>
1213: * @deprecated Use the new <a href="../DynamicAny/DynAnyFactory.html">DynAnyFactory</a> API instead
1214: */
1215: @Deprecated
1216: public org.omg.CORBA.DynSequence create_dyn_sequence(
1217: org.omg.CORBA.TypeCode type)
1218: throws org.omg.CORBA.ORBPackage.InconsistentTypeCode {
1219: throw new org.omg.CORBA.NO_IMPLEMENT();
1220: }
1221:
1222: /**
1223: * Creates a new <code>DynArray</code> object from the given
1224: * <code>TypeCode</code> object.
1225: * <P>
1226: * @param type the <code>TypeCode</code> object from which to create a new
1227: * <code>DynArray</code> object
1228: * @return the new <code>DynArray</code> object created from the given
1229: * <code>TypeCode</code> object
1230: * @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given
1231: * <code>TypeCode</code> object is not consistent with the operation.
1232: * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package
1233: * comments for unimplemented features</a>
1234: * @deprecated Use the new <a href="../DynamicAny/DynAnyFactory.html">DynAnyFactory</a> API instead
1235: */
1236: @Deprecated
1237: public org.omg.CORBA.DynArray create_dyn_array(
1238: org.omg.CORBA.TypeCode type)
1239: throws org.omg.CORBA.ORBPackage.InconsistentTypeCode {
1240: throw new org.omg.CORBA.NO_IMPLEMENT();
1241: }
1242:
1243: /**
1244: * Creates a new <code>DynUnion</code> object from the given
1245: * <code>TypeCode</code> object.
1246: * <P>
1247: * @param type the <code>TypeCode</code> object from which to create a new
1248: * <code>DynUnion</code> object
1249: * @return the new <code>DynUnion</code> object created from the given
1250: * <code>TypeCode</code> object
1251: * @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given
1252: * <code>TypeCode</code> object is not consistent with the operation.
1253: * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package
1254: * comments for unimplemented features</a>
1255: * @deprecated Use the new <a href="../DynamicAny/DynAnyFactory.html">DynAnyFactory</a> API instead
1256: */
1257: @Deprecated
1258: public org.omg.CORBA.DynUnion create_dyn_union(
1259: org.omg.CORBA.TypeCode type)
1260: throws org.omg.CORBA.ORBPackage.InconsistentTypeCode {
1261: throw new org.omg.CORBA.NO_IMPLEMENT();
1262: }
1263:
1264: /**
1265: * Creates a new <code>DynEnum</code> object from the given
1266: * <code>TypeCode</code> object.
1267: * <P>
1268: * @param type the <code>TypeCode</code> object from which to create a new
1269: * <code>DynEnum</code> object
1270: * @return the new <code>DynEnum</code> object created from the given
1271: * <code>TypeCode</code> object
1272: * @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given
1273: * <code>TypeCode</code> object is not consistent with the operation.
1274: * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package
1275: * comments for unimplemented features</a>
1276: * @deprecated Use the new <a href="../DynamicAny/DynAnyFactory.html">DynAnyFactory</a> API instead
1277: */
1278: @Deprecated
1279: public org.omg.CORBA.DynEnum create_dyn_enum(
1280: org.omg.CORBA.TypeCode type)
1281: throws org.omg.CORBA.ORBPackage.InconsistentTypeCode {
1282: throw new org.omg.CORBA.NO_IMPLEMENT();
1283: }
1284:
1285: /**
1286: * Can be invoked to create new instances of policy objects
1287: * of a specific type with specified initial state. If
1288: * <tt>create_policy</tt> fails to instantiate a new Policy
1289: * object due to its inability to interpret the requested type
1290: * and content of the policy, it raises the <tt>PolicyError</tt>
1291: * exception with the appropriate reason.
1292: * @param type the <tt>PolicyType</tt> of the policy object to
1293: * be created
1294: * @param val the value that will be used to set the initial
1295: * state of the <tt>Policy</tt> object that is created
1296: * @return Reference to a newly created <tt>Policy</tt> object
1297: * of type specified by the <tt>type</tt> parameter and
1298: * initialized to a state specified by the <tt>val</tt>
1299: * parameter
1300: * @throws <tt>org.omg.CORBA.PolicyError</tt> when the requested
1301: * policy is not supported or a requested initial state
1302: * for the policy is not supported.
1303: */
1304: public org.omg.CORBA.Policy create_policy(int type,
1305: org.omg.CORBA.Any val) throws org.omg.CORBA.PolicyError {
1306: // Currently not implemented until PIORB.
1307: throw new org.omg.CORBA.NO_IMPLEMENT();
1308: }
1309: }
|