duke@1: /*
msheppar@615: * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
duke@1: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@1: *
duke@1: * This code is free software; you can redistribute it and/or modify it
duke@1: * under the terms of the GNU General Public License version 2 only, as
ohair@158: * published by the Free Software Foundation. Oracle designates this
duke@1: * particular file as subject to the "Classpath" exception as provided
ohair@158: * by Oracle in the LICENSE file that accompanied this code.
duke@1: *
duke@1: * This code is distributed in the hope that it will be useful, but WITHOUT
duke@1: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@1: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@1: * version 2 for more details (a copy is included in the LICENSE file that
duke@1: * accompanied this code).
duke@1: *
duke@1: * You should have received a copy of the GNU General Public License version
duke@1: * 2 along with this work; if not, write to the Free Software Foundation,
duke@1: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@1: *
ohair@158: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ohair@158: * or visit www.oracle.com if you need additional information or have any
ohair@158: * questions.
duke@1: */
duke@1:
duke@1: package org.omg.CORBA;
duke@1:
duke@1: import org.omg.CORBA.portable.*;
duke@1: import org.omg.CORBA.ORBPackage.InvalidName;
duke@1:
duke@1: import java.util.Properties;
duke@1: import java.applet.Applet;
duke@1: import java.io.File;
duke@1: import java.io.FileInputStream;
duke@1:
duke@1: import java.security.AccessController;
duke@1: import java.security.PrivilegedAction;
duke@1:
msheppar@615: import sun.reflect.misc.ReflectUtil;
msheppar@615:
duke@1: /**
duke@1: * A class providing APIs for the CORBA Object Request Broker
duke@1: * features. The ORB
class also provides
duke@1: * "pluggable ORB implementation" APIs that allow another vendor's ORB
duke@1: * implementation to be used.
duke@1: *
duke@1: * An ORB makes it possible for CORBA objects to communicate duke@1: * with each other by connecting objects making requests (clients) with duke@1: * objects servicing requests (servers). duke@1: *
duke@1: *
duke@1: * The ORB
class, which
duke@1: * encapsulates generic CORBA functionality, does the following:
duke@1: * (Note that items 5 and 6, which include most of the methods in
duke@1: * the class ORB
, are typically used with the Dynamic Invocation
duke@1: * Interface
(DII) and the Dynamic Skeleton Interface
duke@1: * (DSI).
duke@1: * These interfaces may be used by a developer directly, but
duke@1: * most commonly they are used by the ORB internally and are
duke@1: * not seen by the general programmer.)
duke@1: *
resolve_initial_references
duke@1: * TypeCode
duke@1: * Any
duke@1: * NamedValue
duke@1: * Context
duke@1: * Environment
duke@1: * NVList
) containing these objects
duke@1: *
duke@1: * The ORB
class can be used to obtain references to objects
duke@1: * implemented anywhere on the network.
duke@1: *
duke@1: * An application or applet gains access to the CORBA environment
duke@1: * by initializing itself into an ORB
using one of
duke@1: * three init
methods. Two of the three methods use the properties
duke@1: * (associations of a name with a value) shown in the
duke@1: * table below.
duke@1: *
Property Name | Property Value |
---|---|
org.omg.CORBA.ORBClass | duke@1: *class name of an ORB implementation |
org.omg.CORBA.ORBSingletonClass | duke@1: *class name of the ORB returned by init() |
duke@1: * These properties allow a different vendor's ORB
duke@1: * implementation to be "plugged in."
duke@1: *
duke@1: * When an ORB instance is being created, the class name of the ORB duke@1: * implementation is located using duke@1: * the following standard search order:
duke@1: * duke@1: *
duke@1: * Note that Java IDL provides a default implementation for the
duke@1: * fully-functional ORB and for the Singleton ORB. When the method
duke@1: * init
is given no parameters, the default Singleton
duke@1: * ORB is returned. When the method init
is given parameters
duke@1: * but no ORB class is specified, the Java IDL ORB implementation
duke@1: * is returned.
duke@1: *
duke@1: * The following code fragment creates an ORB
object
duke@1: * initialized with the default ORB Singleton.
duke@1: * This ORB has a
duke@1: * restricted implementation to prevent malicious applets from doing
duke@1: * anything beyond creating typecodes.
duke@1: * It is called a singleton
duke@1: * because there is only one instance for an entire virtual machine.
duke@1: *
duke@1: * ORB orb = ORB.init(); duke@1: *duke@1: *
duke@1: * The following code fragment creates an ORB
object
duke@1: * for an application. The parameter args
duke@1: * represents the arguments supplied to the application's main
duke@1: * method. Since the property specifies the ORB class to be
duke@1: * "SomeORBImplementation", the new ORB will be initialized with
duke@1: * that ORB implementation. If p had been null,
duke@1: * and the arguments had not specified an ORB class,
duke@1: * the new ORB would have been
duke@1: * initialized with the default Java IDL implementation.
duke@1: *
duke@1: * Properties p = new Properties(); duke@1: * p.put("org.omg.CORBA.ORBClass", "SomeORBImplementation"); duke@1: * ORB orb = ORB.init(args, p); duke@1: *duke@1: *
duke@1: * The following code fragment creates an ORB
object
duke@1: * for the applet supplied as the first parameter. If the given
duke@1: * applet does not specify an ORB class, the new ORB will be
duke@1: * initialized with the default Java IDL implementation.
duke@1: *
duke@1: * ORB orb = ORB.init(myApplet, null); duke@1: *duke@1: *
duke@1: * An application or applet can be initialized in one or more ORBs.
duke@1: * ORB initialization is a bootstrap call into the CORBA world.
duke@1: * @since JDK1.2
duke@1: */
duke@1: abstract public class ORB {
duke@1:
duke@1: //
duke@1: // This is the ORB implementation used when nothing else is specified.
duke@1: // Whoever provides this class customizes this string to
duke@1: // point at their ORB implementation.
duke@1: //
duke@1: private static final String ORBClassKey = "org.omg.CORBA.ORBClass";
duke@1: private static final String ORBSingletonClassKey = "org.omg.CORBA.ORBSingletonClass";
duke@1:
duke@1: //
duke@1: // The global instance of the singleton ORB implementation which
duke@1: // acts as a factory for typecodes for generated Helper classes.
duke@1: // TypeCodes should be immutable since they may be shared across
duke@1: // different security contexts (applets). There should be no way to
duke@1: // use a TypeCode as a storage depot for illicitly passing
duke@1: // information or Java objects between different security contexts.
duke@1: //
duke@1: static private ORB singleton;
duke@1:
duke@1: // Get System property
duke@1: private static String getSystemProperty(final String name) {
duke@1:
duke@1: // This will not throw a SecurityException because this
duke@1: // class was loaded from rt.jar using the bootstrap classloader.
duke@1: String propValue = (String) AccessController.doPrivileged(
duke@1: new PrivilegedAction() {
duke@1: public java.lang.Object run() {
duke@1: return System.getProperty(name);
duke@1: }
duke@1: }
duke@1: );
duke@1:
duke@1: return propValue;
duke@1: }
duke@1:
duke@1: // Get property from orb.properties in either
duke@1: * This no-argument version of the method
duke@1: * This method is not intended to be used by applets, and in the event
duke@1: * that it is called in an applet environment, the ORB it returns
duke@1: * is restricted so that it can be used only as a factory for
duke@1: *
duke@1: * If an ORB is created using this method from an applet,
duke@1: * a system exception will be thrown if
duke@1: * methods other than those for
duke@1: * creating
duke@1: * Calling the method
duke@1: * Deprecated by the OMG in favor of the Portable Object Adapter APIs.
duke@1: *
duke@1: * @param obj The servant object reference
duke@1: */
duke@1: public void connect(org.omg.CORBA.Object obj) {
duke@1: throw new NO_IMPLEMENT();
duke@1: }
duke@1:
duke@1: /**
duke@1: * Destroys the ORB so that its resources can be reclaimed.
duke@1: * Any operation invoked on a destroyed ORB reference will throw the
duke@1: *
duke@1: * If
duke@1: * For maximum portability and to avoid resource leaks, an application should
duke@1: * always call
duke@1: * Calling the method
duke@1: * Deprecated by the OMG in favor of the Portable Object Adapter APIs.
duke@1: *
duke@1: * @param obj The servant object to be disconnected from the ORB
duke@1: */
duke@1: public void disconnect(org.omg.CORBA.Object obj) {
duke@1: throw new NO_IMPLEMENT();
duke@1: }
duke@1:
duke@1: //
duke@1: // ORB method implementations.
duke@1: //
duke@1: // We are trying to accomplish 2 things at once in this class.
duke@1: // It can act as a default ORB implementation front-end,
duke@1: // creating an actual ORB implementation object which is a
duke@1: // subclass of this ORB class and then delegating the method
duke@1: // implementations.
duke@1: //
duke@1: // To accomplish the delegation model, the 'delegate' private instance
duke@1: // variable is set if an instance of this class is created directly.
duke@1: //
duke@1:
duke@1: /**
duke@1: * Returns a list of the initially available CORBA object references,
duke@1: * such as "NameService" and "InterfaceRepository".
duke@1: *
duke@1: * @return an array of
duke@1: * The resulting
duke@1: * A
duke@1: * For the IDL
duke@1: * For example, the following IDL type declaration contains recursion:
duke@1: *
duke@1: * To create a TypeCode for struct Node, you would invoke the TypeCode creation
duke@1: * operations as shown below:
duke@1: *
duke@1: * Also note that the following is an illegal IDL type declaration:
duke@1: *
duke@1: * Recursive types can only appear within sequences which can be empty.
duke@1: * That way marshaling problems, when transmitting the struct in an Any, are avoided.
duke@1: *
duke@1: * @param id the logical id of the referenced type
duke@1: * @return the requested TypeCode
duke@1: */
duke@1: public org.omg.CORBA.TypeCode create_recursive_tc(String id) {
duke@1: // implemented in subclass
duke@1: throw new org.omg.CORBA.NO_IMPLEMENT();
duke@1: }
duke@1:
duke@1: /**
duke@1: * Creates a
duke@1: * While the ORB is in the process of shutting down, the ORB operates as normal,
duke@1: * servicing incoming and outgoing requests until all requests have been completed.
duke@1: * Once an ORB has shutdown, only object reference management operations
duke@1: * may be invoked on the ORB or any object reference obtained from it.
duke@1: * An application may also invoke the
duke@1: * The
duke@1: * @param service_type a
duke@1: * @param value the
duke@1: * @param type the
duke@1: * @param type the
duke@1: * @param type the
duke@1: * @param type the
duke@1: * @param type the
duke@1: * @param type the ORB
singleton object. This method always returns the
duke@1: * same ORB instance, which is an instance of the class described by the
duke@1: * org.omg.CORBA.ORBSingletonClass
system property.
duke@1: * init
is used primarily
duke@1: * as a factory for TypeCode
objects, which are used by
duke@1: * Helper
classes to implement the method type
.
duke@1: * It is also used to create Any
objects that are used to
duke@1: * describe union
labels (as part of creating a
duke@1: * TypeCode
object for a union
).
duke@1: * TypeCode
objects. Any TypeCode
objects
duke@1: * it produces can be safely shared among untrusted applets.
duke@1: * TypeCode
objects are invoked.
duke@1: *
duke@1: * @return the singleton ORB
duke@1: */
tbell@68: public static synchronized ORB init() {
duke@1: if (singleton == null) {
duke@1: String className = getSystemProperty(ORBSingletonClassKey);
duke@1: if (className == null)
duke@1: className = getPropertyFromFile(ORBSingletonClassKey);
msheppar@545: if ((className == null) ||
msheppar@545: (className.equals("com.sun.corba.se.impl.orb.ORBSingleton"))) {
alanb@533: singleton = new com.sun.corba.se.impl.orb.ORBSingleton();
alanb@533: } else {
coffeys@660: singleton = create_impl(className);
alanb@533: }
duke@1: }
duke@1: return singleton;
duke@1: }
duke@1:
duke@1: private static ORB create_impl(String className) {
duke@1: ClassLoader cl = Thread.currentThread().getContextClassLoader();
duke@1: if (cl == null)
duke@1: cl = ClassLoader.getSystemClassLoader();
duke@1:
duke@1: try {
msheppar@615: ReflectUtil.checkPackageAccess(className);
msheppar@615: ClassORB
instance for a standalone
duke@1: * application. This method may be called from applications
duke@1: * only and returns a new fully functional ORB
object
duke@1: * each time it is called.
duke@1: * @param args command-line arguments for the application's main
duke@1: * method; may be null
duke@1: * @param props application-specific properties; may be null
duke@1: * @return the newly-created ORB instance
duke@1: */
duke@1: public static ORB init(String[] args, Properties props) {
duke@1: //
duke@1: // Note that there is no standard command-line argument for
duke@1: // specifying the default ORB implementation. For an
duke@1: // application you can choose an implementation either by
duke@1: // setting the CLASSPATH to pick a different org.omg.CORBA
duke@1: // and it's baked-in ORB implementation default or by
duke@1: // setting an entry in the properties object or in the
duke@1: // system properties.
duke@1: //
duke@1: String className = null;
duke@1: ORB orb;
duke@1:
duke@1: if (props != null)
duke@1: className = props.getProperty(ORBClassKey);
duke@1: if (className == null)
duke@1: className = getSystemProperty(ORBClassKey);
duke@1: if (className == null)
duke@1: className = getPropertyFromFile(ORBClassKey);
msheppar@545: if ((className == null) ||
msheppar@545: (className.equals("com.sun.corba.se.impl.orb.ORBImpl"))) {
alanb@533: orb = new com.sun.corba.se.impl.orb.ORBImpl();
alanb@533: } else {
alanb@533: orb = create_impl(className);
alanb@533: }
duke@1: orb.set_parameters(args, props);
duke@1: return orb;
duke@1: }
duke@1:
duke@1:
duke@1: /**
duke@1: * Creates a new ORB
instance for an applet. This
duke@1: * method may be called from applets only and returns a new
duke@1: * fully-functional ORB
object each time it is called.
duke@1: * @param app the applet; may be null
duke@1: * @param props applet-specific properties; may be null
duke@1: * @return the newly-created ORB instance
duke@1: */
duke@1: public static ORB init(Applet app, Properties props) {
duke@1: String className;
duke@1: ORB orb;
duke@1:
duke@1: className = app.getParameter(ORBClassKey);
duke@1: if (className == null && props != null)
duke@1: className = props.getProperty(ORBClassKey);
duke@1: if (className == null)
duke@1: className = getSystemProperty(ORBClassKey);
duke@1: if (className == null)
duke@1: className = getPropertyFromFile(ORBClassKey);
msheppar@545: if ((className == null) ||
msheppar@545: (className.equals("com.sun.corba.se.impl.orb.ORBImpl"))) {
alanb@533: orb = new com.sun.corba.se.impl.orb.ORBImpl();
alanb@533: } else {
alanb@533: orb = create_impl(className);
alanb@533: }
duke@1: orb.set_parameters(app, props);
duke@1: return orb;
duke@1: }
duke@1:
duke@1: /**
duke@1: * Allows the ORB implementation to be initialized with the given
duke@1: * parameters and properties. This method, used in applications only,
duke@1: * is implemented by subclass ORB implementations and called
duke@1: * by the appropriate init
method to pass in its parameters.
duke@1: *
duke@1: * @param args command-line arguments for the application's main
duke@1: * method; may be null
duke@1: * @param props application-specific properties; may be null
duke@1: */
duke@1: abstract protected void set_parameters(String[] args, Properties props);
duke@1:
duke@1: /**
duke@1: * Allows the ORB implementation to be initialized with the given
duke@1: * applet and parameters. This method, used in applets only,
duke@1: * is implemented by subclass ORB implementations and called
duke@1: * by the appropriate init
method to pass in its parameters.
duke@1: *
duke@1: * @param app the applet; may be null
duke@1: * @param props applet-specific properties; may be null
duke@1: */
duke@1: abstract protected void set_parameters(Applet app, Properties props);
duke@1:
duke@1: /**
duke@1: * Connects the given servant object (a Java object that is
duke@1: * an instance of the server implementation class)
duke@1: * to the ORB. The servant class must
duke@1: * extend the ImplBase
class corresponding to the interface that is
duke@1: * supported by the server. The servant must thus be a CORBA object
duke@1: * reference, and inherit from org.omg.CORBA.Object
.
duke@1: * Servants created by the user can start receiving remote invocations
duke@1: * after the method connect
has been called. A servant may also be
duke@1: * automatically and implicitly connected to the ORB if it is passed as
duke@1: * an IDL parameter in an IDL method invocation on a non-local object,
duke@1: * that is, if the servant object has to be marshalled and sent outside of the
duke@1: * process address space.
duke@1: * connect
has no effect
duke@1: * when the servant object is already connected to the ORB.
duke@1: * OBJECT_NOT_EXIST
exception.
duke@1: * Once an ORB has been destroyed, another call to init
duke@1: * with the same ORBid will return a reference to a newly constructed ORB.destroy
is called on an ORB that has not been shut down,
duke@1: * it will start the shut down process and block until the ORB has shut down
duke@1: * before it destroys the ORB.
duke@1: * If an application calls destroy
in a thread that is currently servicing
duke@1: * an invocation, the BAD_INV_ORDER
system exception will be thrown
duke@1: * with the OMG minor code 3, since blocking would result in a deadlock.shutdown
and destroy
duke@1: * on all ORB instances before exiting.
duke@1: *
duke@1: * @throws org.omg.CORBA.BAD_INV_ORDER if the current thread is servicing an invocation
duke@1: */
duke@1: public void destroy( ) {
duke@1: throw new NO_IMPLEMENT();
duke@1: }
duke@1:
duke@1: /**
duke@1: * Disconnects the given servant object from the ORB. After this method returns,
duke@1: * the ORB will reject incoming remote requests for the disconnected
duke@1: * servant and will send the exception
duke@1: * org.omg.CORBA.OBJECT_NOT_EXIST
back to the
duke@1: * remote client. Thus the object appears to be destroyed from the
duke@1: * point of view of remote clients. Note, however, that local requests issued
duke@1: * using the servant directly do not
duke@1: * pass through the ORB; hence, they will continue to be processed by the
duke@1: * servant.
duke@1: * disconnect
has no effect
duke@1: * if the servant is not connected to the ORB.
duke@1: * String
objects that represent
duke@1: * the object references for CORBA services
duke@1: * that are initially available with this ORB
duke@1: */
duke@1: abstract public String[] list_initial_services();
duke@1:
duke@1: /**
duke@1: * Resolves a specific object reference from the set of available
duke@1: * initial service names.
duke@1: *
duke@1: * @param object_name the name of the initial service as a string
duke@1: * @return the object reference associated with the given name
duke@1: * @exception InvalidName if the given name is not associated with a
duke@1: * known service
duke@1: */
duke@1: abstract public org.omg.CORBA.Object resolve_initial_references(String object_name)
duke@1: throws InvalidName;
duke@1:
duke@1: /**
duke@1: * Converts the given CORBA object reference to a string.
duke@1: * Note that the format of this string is predefined by IIOP, allowing
duke@1: * strings generated by a different ORB to be converted back into an object
duke@1: * reference.
duke@1: * String
object may be stored or communicated
duke@1: * in any way that a String
object can be manipulated.
duke@1: *
duke@1: * @param obj the object reference to stringify
duke@1: * @return the string representing the object reference
duke@1: */
duke@1: abstract public String object_to_string(org.omg.CORBA.Object obj);
duke@1:
duke@1: /**
duke@1: * Converts a string produced by the method object_to_string
duke@1: * back to a CORBA object reference.
duke@1: *
duke@1: * @param str the string to be converted back to an object reference. It must
duke@1: * be the result of converting an object reference to a string using the
duke@1: * method object_to_string
.
duke@1: * @return the object reference
duke@1: */
duke@1: abstract public org.omg.CORBA.Object string_to_object(String str);
duke@1:
duke@1: /**
duke@1: * Allocates an NVList
with (probably) enough
duke@1: * space for the specified number of NamedValue
objects.
duke@1: * Note that the specified size is only a hint to help with
duke@1: * storage allocation and does not imply the maximum size of the list.
duke@1: *
duke@1: * @param count suggested number of NamedValue
objects for
duke@1: * which to allocate space
duke@1: * @return the newly-created NVList
duke@1: *
duke@1: * @see NVList
duke@1: */
duke@1: abstract public NVList create_list(int count);
duke@1:
duke@1: /**
duke@1: * Creates an NVList
initialized with argument
duke@1: * descriptions for the operation described in the given
duke@1: * OperationDef
object. This OperationDef
object
duke@1: * is obtained from an Interface Repository. The arguments in the
duke@1: * returned NVList
object are in the same order as in the
duke@1: * original IDL operation definition, which makes it possible for the list
duke@1: * to be used in dynamic invocation requests.
duke@1: *
duke@1: * @param oper the OperationDef
object to use to create the list
duke@1: * @return a newly-created NVList
object containing
duke@1: * descriptions of the arguments to the method described in the given
duke@1: * OperationDef
object
duke@1: *
duke@1: * @see NVList
duke@1: */
duke@1: public NVList create_operation_list(org.omg.CORBA.Object oper)
duke@1: {
duke@1: // If we came here, it means that the actual ORB implementation
duke@1: // did not have a create_operation_list(...CORBA.Object oper) method,
duke@1: // so lets check if it has a create_operation_list(OperationDef oper)
duke@1: // method.
duke@1: try {
duke@1: // First try to load the OperationDef class
duke@1: String opDefClassName = "org.omg.CORBA.OperationDef";
msheppar@615: Class> opDefClass = null;
duke@1:
duke@1: ClassLoader cl = Thread.currentThread().getContextClassLoader();
duke@1: if ( cl == null )
duke@1: cl = ClassLoader.getSystemClassLoader();
duke@1: // if this throws a ClassNotFoundException, it will be caught below.
duke@1: opDefClass = Class.forName(opDefClassName, true, cl);
duke@1:
duke@1: // OK, we loaded OperationDef. Now try to get the
duke@1: // create_operation_list(OperationDef oper) method.
msheppar@615: Class>[] argc = { opDefClass };
duke@1: java.lang.reflect.Method meth =
duke@1: this.getClass().getMethod("create_operation_list", argc);
duke@1:
duke@1: // OK, the method exists, so invoke it and be happy.
jjg@173: java.lang.Object[] argx = { oper };
duke@1: return (org.omg.CORBA.NVList)meth.invoke(this, argx);
duke@1: }
duke@1: catch( java.lang.reflect.InvocationTargetException exs ) {
duke@1: Throwable t = exs.getTargetException();
duke@1: if (t instanceof Error) {
duke@1: throw (Error) t;
duke@1: }
duke@1: else if (t instanceof RuntimeException) {
duke@1: throw (RuntimeException) t;
duke@1: }
duke@1: else {
duke@1: throw new org.omg.CORBA.NO_IMPLEMENT();
duke@1: }
duke@1: }
duke@1: catch( RuntimeException ex ) {
duke@1: throw ex;
duke@1: }
duke@1: catch( Exception exr ) {
duke@1: throw new org.omg.CORBA.NO_IMPLEMENT();
duke@1: }
duke@1: }
duke@1:
duke@1:
duke@1: /**
duke@1: * Creates a NamedValue
object
duke@1: * using the given name, value, and argument mode flags.
duke@1: * NamedValue
object serves as (1) a parameter or return
duke@1: * value or (2) a context property.
duke@1: * It may be used by itself or
duke@1: * as an element in an NVList
object.
duke@1: *
duke@1: * @param s the name of the NamedValue
object
duke@1: * @param any the Any
value to be inserted into the
duke@1: * NamedValue
object
duke@1: * @param flags the argument mode flags for the NamedValue
: one of
duke@1: * ARG_IN.value
, ARG_OUT.value
,
duke@1: * or ARG_INOUT.value
.
duke@1: *
duke@1: * @return the newly-created NamedValue
object
duke@1: * @see NamedValue
duke@1: */
duke@1: abstract public NamedValue create_named_value(String s, Any any, int flags);
duke@1:
duke@1: /**
duke@1: * Creates an empty ExceptionList
object.
duke@1: *
duke@1: * @return the newly-created ExceptionList
object
duke@1: */
duke@1: abstract public ExceptionList create_exception_list();
duke@1:
duke@1: /**
duke@1: * Creates an empty ContextList
object.
duke@1: *
duke@1: * @return the newly-created ContextList
object
duke@1: * @see ContextList
duke@1: * @see Context
duke@1: */
duke@1: abstract public ContextList create_context_list();
duke@1:
duke@1: /**
duke@1: * Gets the default Context
object.
duke@1: *
duke@1: * @return the default Context
object
duke@1: * @see Context
duke@1: */
duke@1: abstract public Context get_default_context();
duke@1:
duke@1: /**
duke@1: * Creates an Environment
object.
duke@1: *
duke@1: * @return the newly-created Environment
object
duke@1: * @see Environment
duke@1: */
duke@1: abstract public Environment create_environment();
duke@1:
duke@1: /**
duke@1: * Creates a new org.omg.CORBA.portable.OutputStream
into which
duke@1: * IDL method parameters can be marshalled during method invocation.
duke@1: * @return the newly-created
duke@1: * org.omg.CORBA.portable.OutputStream
object
duke@1: */
duke@1: abstract public org.omg.CORBA.portable.OutputStream create_output_stream();
duke@1:
duke@1: /**
duke@1: * Sends multiple dynamic (DII) requests asynchronously without expecting
duke@1: * any responses. Note that oneway invocations are not guaranteed to
duke@1: * reach the server.
duke@1: *
duke@1: * @param req an array of request objects
duke@1: */
duke@1: abstract public void send_multiple_requests_oneway(Request[] req);
duke@1:
duke@1: /**
duke@1: * Sends multiple dynamic (DII) requests asynchronously.
duke@1: *
duke@1: * @param req an array of Request
objects
duke@1: */
duke@1: abstract public void send_multiple_requests_deferred(Request[] req);
duke@1:
duke@1: /**
duke@1: * Finds out if any of the deferred (asynchronous) invocations have
duke@1: * a response yet.
duke@1: * @return true
if there is a response available;
duke@1: * false
otherwise
duke@1: */
duke@1: abstract public boolean poll_next_response();
duke@1:
duke@1: /**
duke@1: * Gets the next Request
instance for which a response
duke@1: * has been received.
duke@1: *
duke@1: * @return the next Request
object ready with a response
duke@1: * @exception WrongTransaction if the method get_next_response
duke@1: * is called from a transaction scope different
duke@1: * from the one from which the original request was sent. See the
duke@1: * OMG Transaction Service specification for details.
duke@1: */
duke@1: abstract public Request get_next_response() throws WrongTransaction;
duke@1:
duke@1: /**
duke@1: * Retrieves the TypeCode
object that represents
duke@1: * the given primitive IDL type.
duke@1: *
duke@1: * @param tcKind the TCKind
instance corresponding to the
duke@1: * desired primitive type
duke@1: * @return the requested TypeCode
object
duke@1: */
duke@1: abstract public TypeCode get_primitive_tc(TCKind tcKind);
duke@1:
duke@1: /**
duke@1: * Creates a TypeCode
object representing an IDL struct
.
duke@1: * The TypeCode
object is initialized with the given id,
duke@1: * name, and members.
duke@1: *
duke@1: * @param id the repository id for the struct
duke@1: * @param name the name of the struct
duke@1: * @param members an array describing the members of the struct
duke@1: * @return a newly-created TypeCode
object describing
duke@1: * an IDL struct
duke@1: */
duke@1: abstract public TypeCode create_struct_tc(String id, String name,
duke@1: StructMember[] members);
duke@1:
duke@1: /**
duke@1: * Creates a TypeCode
object representing an IDL union
.
duke@1: * The TypeCode
object is initialized with the given id,
duke@1: * name, discriminator type, and members.
duke@1: *
duke@1: * @param id the repository id of the union
duke@1: * @param name the name of the union
duke@1: * @param discriminator_type the type of the union
discriminator
duke@1: * @param members an array describing the members of the union
duke@1: * @return a newly-created TypeCode
object describing
duke@1: * an IDL union
duke@1: */
duke@1: abstract public TypeCode create_union_tc(String id, String name,
duke@1: TypeCode discriminator_type,
duke@1: UnionMember[] members);
duke@1:
duke@1: /**
duke@1: * Creates a TypeCode
object representing an IDL enum
.
duke@1: * The TypeCode
object is initialized with the given id,
duke@1: * name, and members.
duke@1: *
duke@1: * @param id the repository id for the enum
duke@1: * @param name the name for the enum
duke@1: * @param members an array describing the members of the enum
duke@1: * @return a newly-created TypeCode
object describing
duke@1: * an IDL enum
duke@1: */
duke@1: abstract public TypeCode create_enum_tc(String id, String name, String[] members);
duke@1:
duke@1: /**
duke@1: * Creates a TypeCode
object representing an IDL alias
duke@1: * (typedef
).
duke@1: * The TypeCode
object is initialized with the given id,
duke@1: * name, and original type.
duke@1: *
duke@1: * @param id the repository id for the alias
duke@1: * @param name the name for the alias
duke@1: * @param original_type
duke@1: * the TypeCode
object describing the original type
duke@1: * for which this is an alias
duke@1: * @return a newly-created TypeCode
object describing
duke@1: * an IDL alias
duke@1: */
duke@1: abstract public TypeCode create_alias_tc(String id, String name,
duke@1: TypeCode original_type);
duke@1:
duke@1: /**
duke@1: * Creates a TypeCode
object representing an IDL exception
.
duke@1: * The TypeCode
object is initialized with the given id,
duke@1: * name, and members.
duke@1: *
duke@1: * @param id the repository id for the exception
duke@1: * @param name the name for the exception
duke@1: * @param members an array describing the members of the exception
duke@1: * @return a newly-created TypeCode
object describing
duke@1: * an IDL exception
duke@1: */
duke@1: abstract public TypeCode create_exception_tc(String id, String name,
duke@1: StructMember[] members);
duke@1:
duke@1: /**
duke@1: * Creates a TypeCode
object representing an IDL interface
.
duke@1: * The TypeCode
object is initialized with the given id
duke@1: * and name.
duke@1: *
duke@1: * @param id the repository id for the interface
duke@1: * @param name the name for the interface
duke@1: * @return a newly-created TypeCode
object describing
duke@1: * an IDL interface
duke@1: */
duke@1:
duke@1: abstract public TypeCode create_interface_tc(String id, String name);
duke@1:
duke@1: /**
duke@1: * Creates a TypeCode
object representing a bounded IDL
duke@1: * string
.
duke@1: * The TypeCode
object is initialized with the given bound,
duke@1: * which represents the maximum length of the string. Zero indicates
duke@1: * that the string described by this type code is unbounded.
duke@1: *
duke@1: * @param bound the bound for the string
; cannot be negative
duke@1: * @return a newly-created TypeCode
object describing
duke@1: * a bounded IDL string
duke@1: * @exception BAD_PARAM if bound is a negative value
duke@1: */
duke@1:
duke@1: abstract public TypeCode create_string_tc(int bound);
duke@1:
duke@1: /**
duke@1: * Creates a TypeCode
object representing a bounded IDL
duke@1: * wstring
(wide string).
duke@1: * The TypeCode
object is initialized with the given bound,
duke@1: * which represents the maximum length of the wide string. Zero indicates
duke@1: * that the string described by this type code is unbounded.
duke@1: *
duke@1: * @param bound the bound for the wstring
; cannot be negative
duke@1: * @return a newly-created TypeCode
object describing
duke@1: * a bounded IDL wstring
duke@1: * @exception BAD_PARAM if bound is a negative value
duke@1: */
duke@1: abstract public TypeCode create_wstring_tc(int bound);
duke@1:
duke@1: /**
duke@1: * Creates a TypeCode
object representing an IDL sequence
.
duke@1: * The TypeCode
object is initialized with the given bound and
duke@1: * element type.
duke@1: *
duke@1: * @param bound the bound for the sequence
, 0 if unbounded
duke@1: * @param element_type
duke@1: * the TypeCode
object describing the elements
duke@1: * contained in the sequence
duke@1: * @return a newly-created TypeCode
object describing
duke@1: * an IDL sequence
duke@1: */
duke@1: abstract public TypeCode create_sequence_tc(int bound, TypeCode element_type);
duke@1:
duke@1: /**
duke@1: * Creates a TypeCode
object representing a
duke@1: * a recursive IDL sequence
.
duke@1: * struct
Node in following code fragment,
duke@1: * the offset parameter for creating its sequence would be 1:
duke@1: *
duke@1: * Struct Node {
duke@1: * long value;
duke@1: * Sequence <Node> subnodes;
duke@1: * };
duke@1: *
duke@1: *
duke@1: * @param bound the bound for the sequence, 0 if unbounded
duke@1: * @param offset the index to the enclosing TypeCode
object
duke@1: * that describes the elements of this sequence
duke@1: * @return a newly-created TypeCode
object describing
duke@1: * a recursive sequence
duke@1: * @deprecated Use a combination of create_recursive_tc and create_sequence_tc instead
duke@1: * @see #create_recursive_tc(String) create_recursive_tc
duke@1: * @see #create_sequence_tc(int, TypeCode) create_sequence_tc
duke@1: */
duke@1: @Deprecated
duke@1: abstract public TypeCode create_recursive_sequence_tc(int bound, int offset);
duke@1:
duke@1: /**
duke@1: * Creates a TypeCode
object representing an IDL array
.
duke@1: * The TypeCode
object is initialized with the given length and
duke@1: * element type.
duke@1: *
duke@1: * @param length the length of the array
duke@1: * @param element_type a TypeCode
object describing the type
duke@1: * of element contained in the array
duke@1: * @return a newly-created TypeCode
object describing
duke@1: * an IDL array
duke@1: */
duke@1: abstract public TypeCode create_array_tc(int length, TypeCode element_type);
duke@1:
duke@1: /**
duke@1: * Create a TypeCode
object for an IDL native type.
duke@1: *
duke@1: * @param id the logical id for the native type.
duke@1: * @param name the name of the native type.
duke@1: * @return the requested TypeCode.
duke@1: */
duke@1: public org.omg.CORBA.TypeCode create_native_tc(String id,
duke@1: String name)
duke@1: {
duke@1: throw new org.omg.CORBA.NO_IMPLEMENT();
duke@1: }
duke@1:
duke@1: /**
duke@1: * Create a TypeCode
object for an IDL abstract interface.
duke@1: *
duke@1: * @param id the logical id for the abstract interface type.
duke@1: * @param name the name of the abstract interface type.
duke@1: * @return the requested TypeCode.
duke@1: */
duke@1: public org.omg.CORBA.TypeCode create_abstract_interface_tc(
duke@1: String id,
duke@1: String name)
duke@1: {
duke@1: throw new org.omg.CORBA.NO_IMPLEMENT();
duke@1: }
duke@1:
duke@1:
duke@1: /**
duke@1: * Create a TypeCode
object for an IDL fixed type.
duke@1: *
duke@1: * @param digits specifies the total number of decimal digits in the number
duke@1: * and must be from 1 to 31 inclusive.
duke@1: * @param scale specifies the position of the decimal point.
duke@1: * @return the requested TypeCode.
duke@1: */
duke@1: public org.omg.CORBA.TypeCode create_fixed_tc(short digits, short scale)
duke@1: {
duke@1: throw new org.omg.CORBA.NO_IMPLEMENT();
duke@1: }
duke@1:
duke@1:
duke@1: // orbos 98-01-18: Objects By Value -- begin
duke@1:
duke@1:
duke@1: /**
duke@1: * Create a TypeCode
object for an IDL value type.
duke@1: * The concrete_base parameter is the TypeCode for the immediate
duke@1: * concrete valuetype base of the valuetype for which the TypeCode
duke@1: * is being created.
duke@1: * It may be null if the valuetype does not have a concrete base.
duke@1: *
duke@1: * @param id the logical id for the value type.
duke@1: * @param name the name of the value type.
duke@1: * @param type_modifier one of the value type modifier constants:
duke@1: * VM_NONE, VM_CUSTOM, VM_ABSTRACT or VM_TRUNCATABLE
duke@1: * @param concrete_base a TypeCode
object
duke@1: * describing the concrete valuetype base
duke@1: * @param members an array containing the members of the value type
duke@1: * @return the requested TypeCode
duke@1: */
duke@1: public org.omg.CORBA.TypeCode create_value_tc(String id,
duke@1: String name,
duke@1: short type_modifier,
duke@1: TypeCode concrete_base,
duke@1: ValueMember[] members)
duke@1: {
duke@1: throw new org.omg.CORBA.NO_IMPLEMENT();
duke@1: }
duke@1:
duke@1: /**
duke@1: * Create a recursive TypeCode
object which
duke@1: * serves as a placeholder for a concrete TypeCode during the process of creating
duke@1: * TypeCodes which contain recursion. The id parameter specifies the repository id of
duke@1: * the type for which the recursive TypeCode is serving as a placeholder. Once the
duke@1: * recursive TypeCode has been properly embedded in the enclosing TypeCode which
duke@1: * corresponds to the specified repository id, it will function as a normal TypeCode.
duke@1: * Invoking operations on the recursive TypeCode before it has been embedded in the
duke@1: * enclosing TypeCode will result in a BAD_TYPECODE
exception.
duke@1: *
duke@1: * Struct Node {
duke@1: * Sequence<Node> subnodes;
duke@1: * };
duke@1: *
duke@1: *
duke@1: * String nodeID = "IDL:Node:1.0";
duke@1: * TypeCode recursiveSeqTC = orb.create_sequence_tc(0, orb.create_recursive_tc(nodeID));
duke@1: * StructMember[] members = { new StructMember("subnodes", recursiveSeqTC, null) };
duke@1: * TypeCode structNodeTC = orb.create_struct_tc(nodeID, "Node", members);
duke@1: *
duke@1: *
duke@1: * Struct Node {
duke@1: * Node next;
duke@1: * };
duke@1: *
duke@1: * TypeCode
object for an IDL value box.
duke@1: *
duke@1: * @param id the logical id for the value type
duke@1: * @param name the name of the value type
duke@1: * @param boxed_type the TypeCode for the type
duke@1: * @return the requested TypeCode
duke@1: */
duke@1: public org.omg.CORBA.TypeCode create_value_box_tc(String id,
duke@1: String name,
duke@1: TypeCode boxed_type)
duke@1: {
duke@1: // implemented in subclass
duke@1: throw new org.omg.CORBA.NO_IMPLEMENT();
duke@1: }
duke@1:
duke@1: // orbos 98-01-18: Objects By Value -- end
duke@1:
duke@1: /**
duke@1: * Creates an IDL Any
object initialized to
duke@1: * contain a Typecode
object whose kind
field
duke@1: * is set to TCKind.tc_null
.
duke@1: *
duke@1: * @return a newly-created Any
object
duke@1: */
duke@1: abstract public Any create_any();
duke@1:
duke@1:
duke@1:
duke@1:
duke@1: /**
duke@1: * Retrieves a Current
object.
duke@1: * The Current
interface is used to manage thread-specific
duke@1: * information for use by services such as transactions and security.
duke@1: *
duke@1: * @see CORBA
package
duke@1: * comments for unimplemented features
duke@1: *
duke@1: * @return a newly-created Current
object
duke@1: * @deprecated use resolve_initial_references
.
duke@1: */
duke@1: @Deprecated
duke@1: public org.omg.CORBA.Current get_current()
duke@1: {
duke@1: throw new org.omg.CORBA.NO_IMPLEMENT();
duke@1: }
duke@1:
duke@1: /**
duke@1: * This operation blocks the current thread until the ORB has
duke@1: * completed the shutdown process, initiated when some thread calls
duke@1: * shutdown
. It may be used by multiple threads which
duke@1: * get all notified when the ORB shuts down.
duke@1: *
duke@1: */
duke@1: public void run()
duke@1: {
duke@1: throw new org.omg.CORBA.NO_IMPLEMENT();
duke@1: }
duke@1:
duke@1: /**
duke@1: * Instructs the ORB to shut down, which causes all
duke@1: * object adapters to shut down, in preparation for destruction.
duke@1: * If the wait_for_completion
parameter
duke@1: * is true, this operation blocks until all ORB processing (including
duke@1: * processing of currently executing requests, object deactivation,
duke@1: * and other object adapter operations) has completed.
duke@1: * If an application does this in a thread that is currently servicing
duke@1: * an invocation, the BAD_INV_ORDER
system exception
duke@1: * will be thrown with the OMG minor code 3,
duke@1: * since blocking would result in a deadlock.
duke@1: * If the wait_for_completion
parameter is FALSE
,
duke@1: * then shutdown may not have completed upon return.destroy
operation on the ORB itself.
duke@1: * Invoking any other operation will throw the BAD_INV_ORDER
duke@1: * system exception with the OMG minor code 4.ORB.run
method will return after
duke@1: * shutdown
has been called.
duke@1: *
duke@1: * @param wait_for_completion true
if the call
duke@1: * should block until the shutdown is complete;
duke@1: * false
if it should return immediately
duke@1: * @throws org.omg.CORBA.BAD_INV_ORDER if the current thread is servicing
duke@1: * an invocation
duke@1: */
duke@1: public void shutdown(boolean wait_for_completion)
duke@1: {
duke@1: throw new org.omg.CORBA.NO_IMPLEMENT();
duke@1: }
duke@1:
duke@1: /**
duke@1: * Returns true
if the ORB needs the main thread to
duke@1: * perform some work, and false
if the ORB does not
duke@1: * need the main thread.
duke@1: *
duke@1: * @return true
if there is work pending, meaning that the ORB
duke@1: * needs the main thread to perform some work; false
duke@1: * if there is no work pending and thus the ORB does not need the
duke@1: * main thread
duke@1: *
duke@1: */
duke@1: public boolean work_pending()
duke@1: {
duke@1: throw new org.omg.CORBA.NO_IMPLEMENT();
duke@1: }
duke@1:
duke@1: /**
duke@1: * Performs an implementation-dependent unit of work if called
duke@1: * by the main thread. Otherwise it does nothing.
duke@1: * The methods work_pending
and perform_work
duke@1: * can be used in
duke@1: * conjunction to implement a simple polling loop that multiplexes
duke@1: * the main thread among the ORB and other activities.
duke@1: *
duke@1: */
duke@1: public void perform_work()
duke@1: {
duke@1: throw new org.omg.CORBA.NO_IMPLEMENT();
duke@1: }
duke@1:
duke@1: /**
duke@1: * Used to obtain information about CORBA facilities and services
duke@1: * that are supported by this ORB. The service type for which
duke@1: * information is being requested is passed in as the in
duke@1: * parameter service_type, the values defined by
duke@1: * constants in the CORBA module. If service information is
duke@1: * available for that type, that is returned in the out parameter
duke@1: * service_info, and the operation returns the
duke@1: * value true. If no information for the requested
duke@1: * services type is available, the operation returns false
duke@1: * (i.e., the service is not supported by this ORB).
duke@1: * short
indicating the
duke@1: * service type for which information is being requested
duke@1: * @param service_info a ServiceInformationHolder
object
duke@1: * that will hold the ServiceInformation
object
duke@1: * produced by this method
duke@1: * @return true
if service information is available
duke@1: * for the service_type;
duke@1: * false if no information for the
duke@1: * requested services type is available
duke@1: * @see CORBA
package
duke@1: * comments for unimplemented features
duke@1: */
duke@1: public boolean get_service_information(short service_type,
duke@1: ServiceInformationHolder service_info)
duke@1: {
duke@1: throw new org.omg.CORBA.NO_IMPLEMENT();
duke@1: }
duke@1:
duke@1: // orbos 98-01-18: Objects By Value -- begin
duke@1:
duke@1: /**
duke@1: * Creates a new DynAny
object from the given
duke@1: * Any
object.
duke@1: * Any
object from which to create a new
duke@1: * DynAny
object
duke@1: * @return the new DynAny
object created from the given
duke@1: * Any
object
duke@1: * @see CORBA
package
duke@1: * comments for unimplemented features
duke@1: * @deprecated Use the new DynAnyFactory API instead
duke@1: */
duke@1: @Deprecated
duke@1: public org.omg.CORBA.DynAny create_dyn_any(org.omg.CORBA.Any value)
duke@1: {
duke@1: throw new org.omg.CORBA.NO_IMPLEMENT();
duke@1: }
duke@1:
duke@1: /**
duke@1: * Creates a basic DynAny
object from the given
duke@1: * TypeCode
object.
duke@1: * TypeCode
object from which to create a new
duke@1: * DynAny
object
duke@1: * @return the new DynAny
object created from the given
duke@1: * TypeCode
object
duke@1: * @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given
duke@1: * TypeCode
object is not consistent with the operation.
duke@1: * @see CORBA
package
duke@1: * comments for unimplemented features
duke@1: * @deprecated Use the new DynAnyFactory API instead
duke@1: */
duke@1: @Deprecated
duke@1: public org.omg.CORBA.DynAny create_basic_dyn_any(org.omg.CORBA.TypeCode type) throws org.omg.CORBA.ORBPackage.InconsistentTypeCode
duke@1: {
duke@1: throw new org.omg.CORBA.NO_IMPLEMENT();
duke@1: }
duke@1:
duke@1: /**
duke@1: * Creates a new DynStruct
object from the given
duke@1: * TypeCode
object.
duke@1: * TypeCode
object from which to create a new
duke@1: * DynStruct
object
duke@1: * @return the new DynStruct
object created from the given
duke@1: * TypeCode
object
duke@1: * @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given
duke@1: * TypeCode
object is not consistent with the operation.
duke@1: * @see CORBA
package
duke@1: * comments for unimplemented features
duke@1: * @deprecated Use the new DynAnyFactory API instead
duke@1: */
duke@1: @Deprecated
duke@1: public org.omg.CORBA.DynStruct create_dyn_struct(org.omg.CORBA.TypeCode type) throws org.omg.CORBA.ORBPackage.InconsistentTypeCode
duke@1: {
duke@1: throw new org.omg.CORBA.NO_IMPLEMENT();
duke@1: }
duke@1:
duke@1: /**
duke@1: * Creates a new DynSequence
object from the given
duke@1: * TypeCode
object.
duke@1: * TypeCode
object from which to create a new
duke@1: * DynSequence
object
duke@1: * @return the new DynSequence
object created from the given
duke@1: * TypeCode
object
duke@1: * @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given
duke@1: * TypeCode
object is not consistent with the operation.
duke@1: * @see CORBA
package
duke@1: * comments for unimplemented features
duke@1: * @deprecated Use the new DynAnyFactory API instead
duke@1: */
duke@1: @Deprecated
duke@1: public org.omg.CORBA.DynSequence create_dyn_sequence(org.omg.CORBA.TypeCode type) throws org.omg.CORBA.ORBPackage.InconsistentTypeCode
duke@1: {
duke@1: throw new org.omg.CORBA.NO_IMPLEMENT();
duke@1: }
duke@1:
duke@1:
duke@1: /**
duke@1: * Creates a new DynArray
object from the given
duke@1: * TypeCode
object.
duke@1: * TypeCode
object from which to create a new
duke@1: * DynArray
object
duke@1: * @return the new DynArray
object created from the given
duke@1: * TypeCode
object
duke@1: * @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given
duke@1: * TypeCode
object is not consistent with the operation.
duke@1: * @see CORBA
package
duke@1: * comments for unimplemented features
duke@1: * @deprecated Use the new DynAnyFactory API instead
duke@1: */
duke@1: @Deprecated
duke@1: public org.omg.CORBA.DynArray create_dyn_array(org.omg.CORBA.TypeCode type) throws org.omg.CORBA.ORBPackage.InconsistentTypeCode
duke@1: {
duke@1: throw new org.omg.CORBA.NO_IMPLEMENT();
duke@1: }
duke@1:
duke@1: /**
duke@1: * Creates a new DynUnion
object from the given
duke@1: * TypeCode
object.
duke@1: * TypeCode
object from which to create a new
duke@1: * DynUnion
object
duke@1: * @return the new DynUnion
object created from the given
duke@1: * TypeCode
object
duke@1: * @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given
duke@1: * TypeCode
object is not consistent with the operation.
duke@1: * @see CORBA
package
duke@1: * comments for unimplemented features
duke@1: * @deprecated Use the new DynAnyFactory API instead
duke@1: */
duke@1: @Deprecated
duke@1: public org.omg.CORBA.DynUnion create_dyn_union(org.omg.CORBA.TypeCode type) throws org.omg.CORBA.ORBPackage.InconsistentTypeCode
duke@1: {
duke@1: throw new org.omg.CORBA.NO_IMPLEMENT();
duke@1: }
duke@1:
duke@1: /**
duke@1: * Creates a new DynEnum
object from the given
duke@1: * TypeCode
object.
duke@1: * TypeCode
object from which to create a new
duke@1: * DynEnum
object
duke@1: * @return the new DynEnum
object created from the given
duke@1: * TypeCode
object
duke@1: * @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given
duke@1: * TypeCode
object is not consistent with the operation.
duke@1: * @see CORBA
package
duke@1: * comments for unimplemented features
duke@1: * @deprecated Use the new DynAnyFactory API instead
duke@1: */
duke@1: @Deprecated
duke@1: public org.omg.CORBA.DynEnum create_dyn_enum(org.omg.CORBA.TypeCode type) throws org.omg.CORBA.ORBPackage.InconsistentTypeCode
duke@1: {
duke@1: throw new org.omg.CORBA.NO_IMPLEMENT();
duke@1: }
duke@1:
duke@1: /**
duke@1: * Can be invoked to create new instances of policy objects
duke@1: * of a specific type with specified initial state. If
duke@1: * create_policy fails to instantiate a new Policy
duke@1: * object due to its inability to interpret the requested type
duke@1: * and content of the policy, it raises the PolicyError
duke@1: * exception with the appropriate reason.
duke@1: * @param type the PolicyType of the policy object to
duke@1: * be created
duke@1: * @param val the value that will be used to set the initial
duke@1: * state of the Policy object that is created
duke@1: * @return Reference to a newly created Policy object
duke@1: * of type specified by the type parameter and
duke@1: * initialized to a state specified by the val
duke@1: * parameter
duke@1: * @throws org.omg.CORBA.PolicyError when the requested
duke@1: * policy is not supported or a requested initial state
duke@1: * for the policy is not supported.
duke@1: */
duke@1: public org.omg.CORBA.Policy create_policy(int type, org.omg.CORBA.Any val)
duke@1: throws org.omg.CORBA.PolicyError
duke@1: {
duke@1: // Currently not implemented until PIORB.
duke@1: throw new org.omg.CORBA.NO_IMPLEMENT();
duke@1: }
duke@1: }