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
const in IDL maps to either a class or a static final variable depending on where the
const is declared in the IDL
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
in parameter maps simply to a
inout parameter maps to a special holder class
An attribute maps to two methods, a
get method and a
We looked at how the client application uses these facts to invoke methods on existing servers. In the following modules, we will look at creating
servers, the mapping for more complicated types, and locating existing servers through a Naming Service.
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: In pass by value, the value of the parameter cannot change, but if it is an object reference, methods on that reference can still be called,
even accessors and mutators. So the internal state of that object can be changed, even if the parameter can not be made to reference a different object.
- Wire: The communication socket between the servers where all communication is reduced to a byte stream.
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.