Lesson 11
Java Corba Mapping Conclusion In this module, we looked at mapping from the most basic elements in IDL to their Java
equivalents. You have seen how
- Modules map to packages
- Each primitive type in IDL has an equivalent in Java
- A const in IDL maps to either a class or a static final variable depending on where the const is declared in the IDL
- A typedef is ignored in the mapping, and the underlying type is used
- An operation in an IDL interface maps to a method in a Java interface
- An operation in parameter maps simply to a method parameter
- An operation out or inout parameter maps to a special holder class
- An attribute maps to two methods, a get method and a set method
Glossary
In this module, you were introduced to the following glossary terms:
- Accessor and mutator: The object-oriented properties of encapsulation and information hiding imply that variables internal to an object should not be accessed directly. It is common practice to create a pair of methods, one to return the value of the variable (the accessor or getter method) and one to set the value of the variable (the mutator or setter).
- By value: The value of the parameter is copied, and so any changes to the value are made on the copy, not the original reference.
- Pass by value: The value of the parameter is copied, and so any changes to the value are made on the copy, not the original reference.
- Java naming standards for packages: This convention for package names holds that all packages produced should start with the domain name reversed. For example, if the producing company is xenotrope.com, all packages would start with com.xenotrope. If the producing company is the computer science department at Yale University, all packages would start with edu.yale.cs.
- Marshalling: Conversion of language-specific data types to values, which can be put onto a byte stream.
- Side-effected
- Wire
The next module covers the mapping for IDL interfaces in detail. You will learn more about the Java interface and other classes that are
generated for each IDL interface, as well as how to implement a server object for an IDL interface.