Define and install a new component  Generate stubs and skeletons

Chapter 2: Creating CORBA Java Components and Clients

Define the multiply method

The component interface will have one method, multiply.

StepsDefining the component interface

  1. Expand the Tutorial package. Double-click the JavaArithmetic component to show the Roles and Interfaces folders beneath it.

  2. Double-click the Interfaces folder, and highlight the Tutorial::JavaArithmetic interface. If you do not see this interface, install it as follows:

    1. Highlight the Interfaces folder and select File | Add Interfaces ...

    2. In the Install Interface dialog box, highlight Tutorial::JavaArithmetic in the Selected to Install table, then click Install.

    3. Highlight the Tutorial::JavaArithmetic interface that is now displayed under the Interfaces folder.

  3. Select File | New Method.

  4. Assign the name multiply to the method.

  5. Click Create New Method.

    You see the Method Properties window.

  6. In the Return field, select double as the method’s return type.

  7. Beneath the empty parameter list, click Add to add a parameter. In the New Parameter dialog:

  8. Click OK to close the New Parameter dialog box.

  9. Repeat steps 7 and 8 to add a second parameter named m2 with a Type of double.

  10. Click OK to close the Method Properties dialog box.





Copyright © 2005. Sybase Inc. All rights reserved. Generate stubs and skeletons

View this book as PDF