Lesson 3 | Skeleton and stub Java classes |
Objective | Describe the stub and skeleton Java classes and interfaces that the IDL compiler will generate from an IDL interface. |
X
, two key Java interfaces are generated: the signature interface, also X
, and the operations interface, XOperations
. The operations interface specifies all the methods that implementing classes must provide to support the IDL interface.
It is used in the server-side mapping. The signature interface, which extends the operations interface, is used as the type in all Java method signatures generated from those IDL operations that used the IDL interface. X
, the IDL compiler can generate a remote stub class called _XStub
and a local stub class called _XLocalStub
. X
, the IDL compiler generates a POA_X
class skeleton that the developer can subclass in order to write the implementation. In this way, an implementation class is hooked into the plumbing by simply inheriting it. Alternatively, the generated POA_X_tie
class can delegate to an implementing class. The names of the tie classes may vary from ORB to ORB. We will be using the JacORB names in this course.
- org.omg.CORBA.portable.InvokeHandler, Vendor code
- org.omg.CORBA.Object, Vendor code
- org.omg.CORBA.PortableServer.Servant, Vendor code
- org.omg.CORBA.portable.ObjectImpl, Vendor code
- X, Generated code: signature interface
- XOperations, Generated code: operations interface
- _XStub, Generated code: stub class
- _XLocalStub, Generated code: local stub class
- POA_X, Generated code: skeleton class
- POA_X_tie, Generated code: skeleton TIE class
- XOperationsImpl, Developer code: implementation object--delegation approach
- XImpl, Developer code: implementation object--inheritance approach
Corba Mapping Hierarchy
View the Corba Mapping Hierarchy below to see the full mapping hierarchy.
In the next lesson, you will learn about the Java operations interface generated for an IDL interface.