IT 222 (Part 4)

Cards (28)

  • By issuing the idlj command, the following files (in the appropriate folder) will be generated based from the example:
    • HelloPOA.java
    • _HelloStub.java
    • Hello.java
    • HelloHelper.java
    • HelloHolder.java
    • HelloOperations.java
  • HelloPOA.java: This abstract class is the stream-based server skeleton, providing basic CORBA functionality for the server.
  • HelloPOA.java extends org.omg.PortableServer.Servant.
  • HelloPOA.java implements the InvokeHandler interface.
  • HelloPOA.java also implements the HelloOperations interface.
  • The servant class, HelloImpl, extends HelloPOA.
  • POA: Allow programmers to construct object implementations that are portable between different ORB products.
  • POA: Provide support for objects with persistent identities.
  • POA: Provide support for transparent activation of objects.
  • POA: Allow a single servant to support multiple object identities simultaneously.
  • _HelloStub.java: This class is the client stub, providing CORBA functionality for the client.
  • _HelloStub.java extends org.omg.CORBA.portable.ObjectImpl.
  • _HelloStub.java implements the Hello.java interface.
  • Hello.java: This interface contains the Java version of our IDL interface.
  • The Hello.java interface extends org.omg.CORBA.Object, providing standard CORBA object functionality.
  • Hello.java also extends the HelloOperations interface and org.omg.CORBA.portable.IDLEntity.
  • HelloHelper.java: This class provides auxiliary functionality, notably the narrow() method required to cast CORBA object references to their proper types.
  • The Helper class is responsible for reading and writing the data type to CORBA streams, and inserting and extracting the data type from Anys.
  • The Holder class delegates to the methods in the Helper class for reading and writing.
  • HelloHolder.java: This final class holds a public instance member of type Hello.
  • Whenever the IDL type is an out or an inout parameter, the Holder class is used.
  • HelloHolder.java provides operations for org.omg.CORBA.portable.OutputStream and org.omg.CORBA.portable.InputStream arguments, which CORBA allows, but which do not map easily to Java's semantics.
  • The Holder class delegates to the methods in the Helper class for reading and writing.
  • HelloHolder.java implements org.omg.CORBA.portable.Streamable.
  • HelloOperations.java: This interface contains the methods sayHello() and shutdown().
  • The IDL-to-Java mapping puts all of the operations defined on the IDL
    interface into HelloOperations.java, which is shared by both the stubs and skeletons.
  • Servant: Implementation of the Hello IDL interface
  • narrow() method: required to cast CORBA object references to their proper types.