Servers

A class that realizes a «CORBAInterface» essentially needs the server-side code for the interface. Rhapsody® interprets an inheritance relationship as a request to generate, compile, and link with the server-side code of the CORBA interface.

A class that directly or indirectly inherits from a CORBA interface must implement all the operations in the parent CORBA interfaces. The bodies of the CORBA interface methods must be implemented in the realizing class. In addition, the realizing class must implement the attributes of its parent CORBA interfaces, and provide accessor and mutator operations (with the appropriate types) for each attribute.

You must manually implement all the attributes, operations, and associations of a CORBA interface in the realizing class. The best way to do this is to drag-and-drop attributes, operations, and relations from the CORBA interface into the realizing class. This implementation ensures that CORBA types in the CORBA interface are translated to the corresponding C++ types in the realizing class. It also ensures that the appropriate accessors and mutators are generated for the attributes.

It is important to follow all the guidelines described in the following sections for server realization. If you do not adhere to these guidelines, the compiler might report errors at compile time, or CORBA exceptions might be thrown during run time. Rhapsody performs some checks to detect possible violations before generating code.