Java Technology Home Page
A-Z Index

Java Developer Connection(SM)
Online Training

Downloads, APIs, Documentation
Java Developer Connection
Tutorials, Tech Articles, Training
Online Support
Community Discussion
News & Events from Everywhere
Products from Everywhere
How Java Technology is Used Worldwide
 

Help is available for each task.



    Task 1

    First take a look at the IDL file, pingpong.idl, and generate it.



    Use idl2java pingpong.idl.

    Task 2

    Examine the two implementation classes, PingObjectImpl andPongObjectImpl to see how they work and how to use them.


    Task 3

    Using the skeleton code file as a starting point, modify the classPingServer to add all the code necessary to start up the ORBand BOA, create a PingObject instance, set the maximum number of pings, etc. There are comments to guide your way. Be sure to pick a unique name for your PingObject instance.



    The code in this class will be very similar to the code inthe MBServer class from the previous Magercise.

    Task 4

    Now fill out the PongServer class. The codeneeded here will be very similar to that for PingServer,but you will also initiate the ping-pong exchange.



    In addition to the code that is similar to that in PingServer, you will have to add code to bind to an instance of PingObject,and call the ping method of that object.

    Task 5

    Compile your program and run it to see what happens.


Copyright © 1998-1999 MageLang Institute. All Rights Reserved.


[ This page was updated: 3-Dec-99 ]

Products & APIs | Developer Connection | Docs & Training | Online Support
Community Discussion | Industry News | Solutions Marketplace | Case Studies
Glossary - Applets - Tutorial - Employment - Business & Licensing - Java Store - Java in the Real World
FAQ | Feedback | Map | A-Z Index
For more information on Java technology
and other software from Sun Microsystems, call:
(800) 786-7638
Outside the U.S. and Canada, dial your country's AT&T Direct Access Number first.
Sun Microsystems, Inc.
Copyright © 1995-99 Sun Microsystems, Inc.
All Rights Reserved. Legal Terms. Privacy Policy.