Java Programming  «Prev  Next»
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
  1. Modules map to packages
  2. Each primitive type in IDL has an equivalent in Java
  3. A const in IDL maps to either a class or a static final variable depending on where the const is declared in the IDL
  4. A typedef is ignored in the mapping, and the underlying type is used
  5. An operation in an IDL interface maps to a method in a Java interface
  6. An operation in parameter maps simply to a method parameter
  7. An operation out or inout parameter maps to a special holder class
  8. An attribute maps to two methods, a get method and a set method
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.

Glossary

In this module, you were introduced to the following glossary terms:
  1. 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).
  2. 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.
  3. 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.
  4. 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.
  5. Marshalling: Conversion of language-specific data types to values, which can be put onto a byte stream.
  6. 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.
  7. 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.