Corba idl-to-Java ing

Source: Internet
Author: User

General structure:

1. CORBA Module
The module is mapped to a Java package with the same name as the IDL module.

2. Exception in CORBA
Two types of exceptions are defined in CORBA.
I. system exceptions an exception defined by CORBA
Ii. User-defined exceptions defined by the user in IDL

3. CORBA Parameters
CORBA defines three parameter transmission modes: In, out, And inout. Java only supports in.

4. CORBA holder class
Because Java does not have the IDL out and inout pairs, for the IDL out and inout parameters, IDL-to-Java ing must provide some additional mechanisms to support value transfer (and return results ).
Holding defines the holder class, which implements the additional parameter transfer mode in Java. For each IDL out or inout parameter, the customer must instantiate an instance of the appropriate holder class (it is passed through the value ).

5. CORBA helper class
The helper class contains methods used to operate IDL in different ways.
The helper class provides static methods that customers can use to operate types, including any insert and retrieve operations for this type, the repository ID, and the typecode) read the type from the stream and write the type into the stream.
In addition, the helper class mapped to the IDL Interface provides a static narrow method that can be used for forced type conversion.

6. CORBA attributes
The corba idl Interface can have attributes, which are required for set and get operations in the type domain.
Each attribute is mapped to an overloaded Java accessor and modifier method with the same name as the attribute.

Structure Type:

1. Sequence)
A Variable-size sequence of one-dimensional elements, where elements can be any types defined by IDL. You can limit the maximum length of a sequence.

2. struct (structure)
The structure can be used to assemble multiple types of naming fields.
Each struct has two constructors. One is the default constructor, which sets all fields in the structure to null. The second constructor uses the structure field as the parameter and initializes each field.

3. Union)
It is used to reference only one of several data members at any given time (only one member can be referenced in memory at any time ). The discriminator label value is used together to display the member in the Union.

4. Any
Any is a self-describing data structure that retains its type. It enables you to extract and insert pre-defined IDL type values with type-safe conversion functions at runtime.
The any type allows you to specify a property value, parameter, or return type. This type contains any type that is not determined during compilation at runtime. You can use any to pass everything.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.