duke@1: /*
duke@1: * Copyright 2000-2003 Sun Microsystems, Inc. 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
duke@1: * published by the Free Software Foundation. Sun designates this
duke@1: * particular file as subject to the "Classpath" exception as provided
duke@1: * by Sun 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: *
duke@1: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
duke@1: * CA 95054 USA or visit www.sun.com if you need additional information or
duke@1: * have any questions.
duke@1: */
duke@1:
duke@1: #ifndef _IOP_IDL_
duke@1: #define _IOP_IDL_
duke@1:
duke@1: #include "CORBAX.idl"
duke@1:
duke@1: #pragma prefix "omg.org"
duke@1:
duke@1: #ifndef CORBA3
duke@1: #define local
duke@1: #endif
duke@1:
duke@1: module IOP {
duke@1: //
duke@1: // Standard Protocol Profile tag values
duke@1: //
duke@1: /** Profile ID */
duke@1: typedef unsigned long ProfileId;
duke@1:
duke@1: /**
duke@1: * Identifies profiles that
duke@1: * support the Internet Inter-ORB Protocol. The ProfileBody
duke@1: * of this profile contains a CDR encapsulation of a structure
duke@1: * containing addressing and object identification information used by
duke@1: * IIOP. Version 1.1 of the TAG_INTERNET_IOP
profile
duke@1: * also includes an array of TaggedComponent objects that can
duke@1: * contain additional information supporting optional IIOP features,
duke@1: * ORB services such as security, and future protocol extensions.
duke@1: *
duke@1: * Protocols other than IIOP (such as ESIOPs and other GIOPs) can share
duke@1: * profile information (such as object identity or security
duke@1: * information) with IIOP by encoding their additional profile information
duke@1: * as components in the TAG_INTERNET_IOP
profile. All
duke@1: * TAG_INTERNET_IOP
profiles support IIOP, regardless of
duke@1: * whether they also support additional protocols. Interoperable
duke@1: * ORBs are not required to create or understand any other profile,
duke@1: * nor are they required to create or understand any of the components
duke@1: * defined for other protocols that might share the
duke@1: * TAG_INTERNET_IOP
profile with IIOP.
duke@1: *
duke@1: * The profile_data
for the TAG_INTERNET_IOP
duke@1: * profile is a CDR encapsulation of the IIOP.ProfileBody_1_1
duke@1: * type.
duke@1: */
duke@1: const ProfileId TAG_INTERNET_IOP = 0;
duke@1:
duke@1: /**
duke@1: * Indicates that the value encapsulated is of type
duke@1: * MultipleComponentProfile
. In this case, the profile
duke@1: * consists of a list of protocol components, the use of which must
duke@1: * be specified by the protocol using this profile. This profile may
duke@1: * be used to carry IOR components.
duke@1: *
duke@1: * The
duke@1: * This data structure need not be used internally to any given ORB,
duke@1: * and is not intended to be visible to application-level ORB programmers.
duke@1: * It should be used only when crossing object reference domain
duke@1: * boundaries, within bridges.
duke@1: *
duke@1: * This data structure is designed to be efficient in typical
duke@1: * single-protocol configurations, while not penalizing multiprotocol ones.
duke@1: *
duke@1: * Object references have at least one tagged profile. Each profile
duke@1: * supports one or more protocols and encapsulates all the basic
duke@1: * information the protocols it supports need to identify an object.
duke@1: * Any single profile holds enough information to drive a complete
duke@1: * invocation using any of the protocols it supports; the content
duke@1: * and structure of those profile entries are wholly specified by
duke@1: * these protocols. A bridge between two domains may need to know the
duke@1: * detailed content of the profile for those domains' profiles,
duke@1: * depending on the technique it uses to bridge the domains.
duke@1: *
duke@1: * Each profile has a unique numeric tag, assigned by the OMG.
duke@1: * Profile tags in the range 0x80000000 through 0xffffffff are reserved
duke@1: * for future use, and are not currently available for assignment.
duke@1: *
duke@1: * Null object references are indicated by an empty set of profiles,
duke@1: * and by a "Null" type ID (a string which contains only a single
duke@1: * terminating character). A Null
duke@1: * The type ID, if provided by the server, indicates the most derived
duke@1: * type that the server wishes to publish, at the time the reference
duke@1: * is generated. The object's actual most derived type may later change
duke@1: * to a more derived type. Therefore, the type ID in the IOR can only
duke@1: * be interpreted by the client as a hint that the object supports at
duke@1: * least the indicated interface. The client can succeed in narrowing
duke@1: * the reference to the indicated interface, or to one of its base
duke@1: * interfaces, based solely on the type ID in the IOR, but must not fail
duke@1: * to narrow the reference without consulting the object via the
duke@1: * "_is_a" or "_get_interface" pseudo-operations.
duke@1: */
duke@1: struct IOR {
duke@1: /** The type id, represented as a String. */
duke@1: string type_id;
duke@1:
duke@1: /**
duke@1: * An array of tagged profiles associated with this
duke@1: * object reference.
duke@1: */
duke@1: sequence
duke@1: * Specifications of components must include the following information:
duke@1: *
duke@1: * The
duke@1: * The
duke@1: * The
duke@1: * Zero or more instances of the
duke@1: * For values and value helpers, the codebase is transmitted after the
duke@1: * value tag. For stubs and ties, the codebase is transmitted as
duke@1: * the TaggedComponent
duke@1: *
duke@1: *
duke@1: *
duke@1: * A
duke@1: * The encodings currently supported are:
duke@1: *
duke@1: * @param enc The encoding for which to create a profile_data
for the
duke@1: * TAG_MULTIPLE_COMPONENTS
profile is a CDR encapsulation
duke@1: * of the MultipleComponentProfile
type shown above.
duke@1: */
duke@1: const ProfileId TAG_MULTIPLE_COMPONENTS = 1;
duke@1:
duke@1: /**
duke@1: * Object references have at least one tagged profile. Each profile
duke@1: * supports one or more protocols and encapsulates all the basic
duke@1: * information the protocols it supports need to identify an object.
duke@1: * Any single profile holds enough information to drive a complete
duke@1: * invocation using any of the protocols it supports; the content
duke@1: * and structure of those profile entries are wholly specified by
duke@1: * these protocols.
duke@1: */
duke@1: struct TaggedProfile {
duke@1: /** The tag, represented as a profile id. */
duke@1: ProfileId tag;
duke@1:
duke@1: /** The associated profile data. */
duke@1: sequence TypeID
is the only
duke@1: * mechanism that can be used to represent the type
duke@1: * CORBA.Object
. Type IDs may only be "Null" in any message,
duke@1: * requiring the client to use existing knowledge or to consult the
duke@1: * object, to determine interface types supported. The type ID
duke@1: * is a Repository ID identifying the interface type, and is provided
duke@1: * to allow ORBs to preserve strong typing. This identifier is agreed
duke@1: * on within the bridge and, for reasons outside the scope of the
duke@1: * interoperability specification, needs to have a much broader scope to
duke@1: * address various problems in system evolution and maintenance.
duke@1: * Type IDs support detection of type equivalence, and in conjunction
duke@1: * with an Interface Repository, allow processes to reason about the
duke@1: * relationship of the type of the object referred to and any other type.
duke@1: * TaggedComponents
contained in
duke@1: * TAG_INTERNET_IOP
and
duke@1: * TAG_MULTIPLE_COMPONENTS
profiles are identified by
duke@1: * unique numeric tags using a namespace distinct form that is used for
duke@1: * profile tags. Component tags are assigned by the OMG.
duke@1: *
duke@1: *
duke@1: * Specification of protocols must describe how the components affect
duke@1: * the protocol. The following should be specified in any protocol
duke@1: * definition for each TaggedComponent
that the protocol uses:
duke@1: *
duke@1: *
duke@1: */
duke@1: struct TaggedComponent {
duke@1: /** The tag, represented as a component id. */
duke@1: ComponentId tag;
duke@1:
duke@1: /** The component data associated with the component id. */
duke@1: sequence TAG_ORB_TYPE
component has an associated value of
duke@1: * type unsigned long (Java long), encoded as a CDR encapsulation,
duke@1: * designating an ORB type ID allocated by the OMG for the ORB type of the
duke@1: * originating ORB. Anyone may register any ORB types by submitting
duke@1: * a short (one-paragraph) description of the ORB type to the OMG,
duke@1: * and will receive a new ORB type ID in return. A list of ORB type
duke@1: * descriptions and values will be made available on the OMG web server.
duke@1: * TAG_ORB_TYPE
component can appear at most once in
duke@1: * any IOR profile. For profiles supporting IIOP 1.1 or greater, it
duke@1: * is optionally present.
duke@1: */
duke@1: const ComponentId TAG_ORB_TYPE = 0 ;
duke@1:
duke@1: /**
duke@1: * The code set component of the IOR multi-component profile structure
duke@1: * contains:
duke@1: *
duke@1: *
duke@1: * Both char and wchar conversion code sets are listed in order of
duke@1: * preference.
duke@1: */
duke@1: const ComponentId TAG_CODE_SETS = 1 ;
duke@1:
duke@1: /**
duke@1: * A profile component containing the sequence of QoS policies exported
duke@1: * with the object reference by an object adapter.
duke@1: */
duke@1: const ComponentId TAG_POLICIES = 2 ;
duke@1:
duke@1: /**
duke@1: * In cases where the same object key is used for more than one
duke@1: * internet location, the following standard IOR Component is defined
duke@1: * for support in IIOP version 1.2.
duke@1: * TAG_ALTERNATE_IIOP_ADDRESS
component has an
duke@1: * associated value of type:
duke@1: *
duke@1: *
duke@1: * encoded as a CDR encapsulation.
duke@1: *
duke@1: * struct {
duke@1: * string HostID,
duke@1: * short Port
duke@1: * };
duke@1: *
duke@1: * TAG_ALTERNATE_IIOP_ADDRESS
duke@1: * component type may be included in a version 1.2
duke@1: * TAG_INTERNET_IOP
Profile. Each of these alternative
duke@1: * addresses may be used by the client orb, in addition to the host
duke@1: * and port address expressed in the body of the Profile. In cases
duke@1: * where one or more TAG_ALTERNATE_IIOP_ADDRESS
components
duke@1: * are present in a TAG_INTERNET_IOP
Profile, no order of
duke@1: * use is prescribed by Version 1.2 of IIOP.
duke@1: */
duke@1: const ComponentId TAG_ALTERNATE_IIOP_ADDRESS = 3 ;
duke@1:
duke@1: /**
duke@1: * Class downloading is supported for stubs, ties, values, and
duke@1: * value helpers. The specification allows transmission of codebase
duke@1: * information on the wire for stubs and ties, and enables usage of
duke@1: * pre-existing ClassLoaders when relevant.
duke@1: * TAG_JAVA_CODEBASE
in the IOR
duke@1: * profile, where the component_data
is a CDR encapsulation
duke@1: * of the codebase written as an IDL string. The codebase is a
duke@1: * space-separated list of one or more URLs.
duke@1: */
duke@1: const ComponentId TAG_JAVA_CODEBASE = 25 ;
duke@1:
duke@1: /**
duke@1: * RMI-IIOP has multiple stream format versions. A server
duke@1: * can specify its maximum version by including the
duke@1: * TAG_RMI_CUSTOM_MAX_STREAM_FORMAT tagged component or
duke@1: * rely on the default of version 1 for GIOP 1.2 and less
duke@1: * and version 2 for GIOP 1.3 and higher.
duke@1: *
duke@1: * See Java to IDL ptc/02-01-12 1.4.11.
duke@1: */
duke@1: const ComponentId TAG_RMI_CUSTOM_MAX_STREAM_FORMAT = 38 ;
duke@1:
duke@1: /** An array of tagged components, forming a multiple component profile. */
duke@1: typedef sequence CosTSInteroperation.PropogationContext
defined in
duke@1: * CORBAservices: Common Object Services Specifications.
duke@1: */
duke@1: const ServiceId TransactionService = 0;
duke@1:
duke@1: /**
duke@1: * Identifies a CDR encapsulation of the
duke@1: * CONV_FRAME.CodeSetContext
defined in
duke@1: * Section 13.10.2.5, "GIOP Code Set Service Context," on page 13-43.
duke@1: */
duke@1: const ServiceId CodeSets = 1;
duke@1:
duke@1: /**
duke@1: * Identifies a CDR encapsulation of the RMICustomMaxStreamFormat
duke@1: * service context which contains a single byte specifying
duke@1: * the client's maximum RMI-IIOP stream format version.
duke@1: *
duke@1: * See Java to IDL ptc/02-01-12 1.4.12.
duke@1: */
duke@1: const ServiceId RMICustomMaxStreamFormat = 17 ;
duke@1:
duke@1: /**
duke@1: * DCOM-CORBA Interworking uses three service contexts as defined in
duke@1: * "DCOM-CORBA Interworking" in the "Interoperability with non-CORBA
duke@1: * Systems" chapter.
duke@1: * ChainBypassCheck
carries a CDR encapsulation of the
duke@1: * struct CosBridging.ChainBypassCheck
. This is carried
duke@1: * only in a Request message as described in Section 20.9.1, "CORBA
duke@1: * Chain Bypass," on page 20-19.
duke@1: */
duke@1: const ServiceId ChainBypassCheck = 2;
duke@1:
duke@1: /**
duke@1: * DCOM-CORBA Interworking uses three service contexts as defined in
duke@1: * "DCOM-CORBA Interworking" in the "Interoperability with non-CORBA
duke@1: * Systems" chapter.
duke@1: * ChainBypassInfo
carries a CDR encapsulation of the
duke@1: * struct CosBridging.ChainBypassInfo
. This is carried
duke@1: * only in a Reply message as described in Section 20.9.1, "CORBA Chain
duke@1: * Bypass," on page 20-19.
duke@1: */
duke@1: const ServiceId ChainBypassInfo = 3;
duke@1:
duke@1: /**
duke@1: * DCOM-CORBA Interworking uses three service contexts as defined in
duke@1: * "DCOM-CORBA Interworking" in the "Interoperability with non-CORBA
duke@1: * Systems" chapter.
duke@1: * LogicalThreadId
, carries a CDR encapsulation of
duke@1: * the struct CosBridging.LogicalThreadId
as described
duke@1: * in Section 20.10, "Thread Identification," on page 20-21.
duke@1: */
duke@1: const ServiceId LogicalThreadId = 4;
duke@1:
duke@1: /**
duke@1: * Identifies a CDR encapsulation of the
duke@1: * IIOP.BiDirIIOPServiceContext
defined in Section 15.8,
duke@1: * "Bi-Directional GIOP," on page 15-55.
duke@1: */
duke@1: const ServiceId BI_DIR_IIOP = 5;
duke@1:
duke@1: /**
duke@1: * Identifies a CDR encapsulation of the IOR of the
duke@1: * SendingContext.RunTime
object (see Section 5.6, "Access
duke@1: * to the Sending Context Run Time," on page 5-15).
duke@1: */
duke@1: const ServiceId SendingContextRunTime = 6;
duke@1:
duke@1: /**
duke@1: * For information on INVOCATION_POLICIES
refer to the
duke@1: * Asynchronous Messaging specification - orbos/98-05-05.
duke@1: */
duke@1: const ServiceId INVOCATION_POLICIES = 7;
duke@1:
duke@1: /**
duke@1: * For information on FORWARDED_IDENTITY
refer to the
duke@1: * Firewall specification - orbos/98-05-04.
duke@1: */
duke@1: const ServiceId FORWARDED_IDENTITY = 8;
duke@1:
duke@1: /**
duke@1: * Identifies a CDR encapsulation of a marshaled instance of a
duke@1: * java.lang.Throwable or one of its subclasses as described in Java
duke@1: * to IDL Language Mapping, Section 1.4.8.1, "Mapping of
duke@1: * UnknownExceptionInfo Service Context," on page 1-32.
duke@1: */
duke@1: const ServiceId UnknownExceptionInfo = 9;
duke@1:
duke@1: /**
duke@1: * CORBA formal/02-06-01: 13.7.1:
duke@1: * ExceptionDetailMessage identifies a CDR encapsulation of a wstring,
duke@1: * encoded using GIOP 1.2 with a TCS-W of UTF-16. This service context
duke@1: * may be sent on Reply messages with a reply_status of SYSTEM_EXCEPTION
duke@1: * or USER_EXCEPTION. The usage of this service context is defined
duke@1: * by language mappings.
duke@1: *
duke@1: * IDL/Java: ptc/02-01-22: 1.15.2:
duke@1: * When a System Exception is marshaled, its GIOP Reply message shall
duke@1: * include an associated ExceptionDetailMessage service context. The
duke@1: * callee's stack trace is often very valuable debugging information but
duke@1: * may contain sensitive or unwanted information. The wstring within the
duke@1: * service context will therefore contain additional information relating
duke@1: * to the exception, for example the result of calling either
duke@1: * printStackTrace(PrintWriter) or getMessage() on the exception. When
duke@1: * unmarshaling a System Exception on the client side, the wstring from
duke@1: * any ExceptionDetailMessage service context shall become the Java error
duke@1: * message in the unmarshaled exception object.
duke@1: */
duke@1: const ServiceId ExceptionDetailMessage = 14;
duke@1:
duke@1:
duke@1: // BEGIN part which lived in Interceptors.idl.
duke@1:
duke@1: /**
duke@1: * An array of TaggedComponent
objects.
duke@1: */
duke@1: typedef sequenceCodec
provides a mechanism
duke@1: * to transfer these components between their IDL data types and their CDR
duke@1: * encapsulation representations.
duke@1: * Codec
is obtained from the CodecFactory
.
duke@1: * The CodecFactory
is obtained through a call to
duke@1: * ORB.resolve_initial_references( "CodecFactory" )
.
duke@1: */
duke@1: local interface Codec {
duke@1:
duke@1: /**
duke@1: * This exception is thrown by Codec.encode
or
duke@1: * Codec.encode_value
when the type is invalid for the
duke@1: * encoding. For example, this exception is thrown if the encoding is
duke@1: * ENCODING_CDR_ENCAPS
version 1.0 and a type
duke@1: * that does not exist in that version, such as wstring
,
duke@1: * is passed to the operation.
duke@1: */
duke@1: exception InvalidTypeForEncoding {};
duke@1:
duke@1: /**
duke@1: * This exception is thrown by Codec.decode
or
duke@1: * Codec.decode_value
when the data in the byte array
duke@1: * cannot be decoded into an Any.
duke@1: */
duke@1: exception FormatMismatch {};
duke@1:
duke@1: /**
duke@1: * This exception is thrown by decode_value
when the given
duke@1: * TypeCode
does not match the given byte array.
duke@1: */
duke@1: exception TypeMismatch {};
duke@1:
duke@1: /**
duke@1: * Converts the given any into a byte array based on the encoding
duke@1: * format effective for this Codec
.
duke@1: *
duke@1: * @param data The data, in the form of an any, to be encoded into
duke@1: * a byte array.
duke@1: * @return A byte array containing the encoded Any. This byte array
duke@1: * contains both the TypeCode
and the data of the type.
duke@1: * @exception InvalidTypeForEncoding thrown if the type is not valid for
duke@1: * the encoding format effective for this Codec
.
duke@1: */
duke@1: CORBA::OctetSeq encode (in any data)
duke@1: raises (InvalidTypeForEncoding);
duke@1:
duke@1: /**
duke@1: * Decodes the given byte array into an Any based on the encoding
duke@1: * format effective for this Codec
.
duke@1: *
duke@1: * @param data The data, in the form of a byte array, to be decoded into
duke@1: * an Any.
duke@1: * @return An Any containing the data from the decoded byte array.
duke@1: * @exception FormatMismatch is thrown if the byte array cannot be
duke@1: * decoded into an Any.
duke@1: */
duke@1: any decode (in CORBA::OctetSeq data) raises (FormatMismatch);
duke@1:
duke@1: /**
duke@1: * Converts the given any into a byte array based on the encoding
duke@1: * format effective for this Codec. Only the data from the Any is
duke@1: * encoded, not the TypeCode
.
duke@1: *
duke@1: * @param data The data, in the form of an Any, to be encoded into
duke@1: * a byte array.
duke@1: * @return A byte array containing the data from the encoded any.
duke@1: * @exception InvalidTypeForEncoding thrown if the type is not valid for
duke@1: * the encoding format effective for this Codec
.
duke@1: */
duke@1: CORBA::OctetSeq encode_value (in any data)
duke@1: raises (InvalidTypeForEncoding);
duke@1:
duke@1: /**
duke@1: * Decodes the given byte array into an Any based on the given
duke@1: * TypeCode
and the encoding format effective for
duke@1: * this Codec
.
duke@1: *
duke@1: * @param data The data, in the form of a byte array, to be decoded
duke@1: * into an Any.
duke@1: * @param tc The TypeCode to be used to decode the data.
duke@1: * @return An Any containing the data from the decoded byte array.
duke@1: * @exception FormatMismatch thrown if the byte array cannot be
duke@1: * decoded into an Any.
duke@1: */
duke@1: any decode_value (in CORBA::OctetSeq data, in CORBA::TypeCode tc)
duke@1: raises (FormatMismatch, TypeMismatch);
duke@1: };
duke@1:
duke@1: /**
duke@1: * Defines an encoding format of a Codec
, such as
duke@1: * CDR Encapsulation (ENCODING_CDR_ENCAPS
).
duke@1: */
duke@1: typedef short EncodingFormat;
duke@1:
duke@1: /**
duke@1: * The CDR Encapsulation encoding.
duke@1: * @see CodecFactory
duke@1: */
duke@1: const EncodingFormat ENCODING_CDR_ENCAPS = 0;
duke@1:
duke@1: /**
duke@1: * Defines the encoding format of a Codec
. This class
duke@1: * details the encoding format, such as CDR Encapsulation encoding, and
duke@1: * the major and minor versions of that format.
duke@1: *
duke@1: *
duke@1: * Vendors are free to support additional encodings.
duke@1: *
duke@1: * @see ENCODING_CDR_ENCAPS
duke@1: */
duke@1: struct Encoding {
duke@1: /**
duke@1: * The encoding format.
duke@1: */
duke@1: EncodingFormat format;
duke@1:
duke@1: /**
duke@1: * The major version of this Encoding format.
duke@1: */
duke@1: octet major_version;
duke@1:
duke@1: /**
duke@1: * The minor version of this Encoding format.
duke@1: */
duke@1: octet minor_version;
duke@1: };
duke@1:
duke@1: /**
duke@1: * ENCODING_CDR_ENCAPS
, version 1.0;ENCODING_CDR_ENCAPS
, version 1.1;ENCODING_CDR_ENCAPS
, version 1.2;ENCODING_CDR_ENCAPS
for all future versions of GIOP as
duke@1: * they arise.Codecs
are obtained from the CodecFactory
.
duke@1: * The CodecFactory
is obtained through a call to
duke@1: * ORB.resolve_initial_references( "CodecFactory" )
.
duke@1: */
duke@1: local interface CodecFactory {
duke@1: /**
duke@1: * This exception is thrown by CodecFactory.create_codec
when
duke@1: * the factory cannot create a Codec
for a given encoding.
duke@1: */
duke@1: exception UnknownEncoding {};
duke@1:
duke@1: /**
duke@1: * Create a Codec
of the given encoding.
duke@1: * Codec
.
duke@1: * @return A Codec
obtained with the given encoding.
duke@1: * @exception UnknownEncoding thrown if this factory cannot create a
duke@1: * Codec
of the given encoding.
duke@1: */
duke@1: Codec create_codec (in Encoding enc) raises (UnknownEncoding);
duke@1: };
duke@1:
duke@1: // END part which lived in Interceptors.idl.
duke@1:
duke@1: };
duke@1:
duke@1: #endif // _IOP_IDL_