|
Server.java |
// Building Distributed Object Applications with CORBA // Infowave (Thailand) Co., Ltd. // http://www.waveman.com // Jan 1998 public class Server {
org.omg.CORBA.BOA boa = null;
// TIE uses these two new lines AircraftCarrierImpl new_carrier = new
AircraftCarrierImpl(boa);
try {
System.out.println(carrier + " ready for launch !!!"); try {
|
AircraftCarrierImpl.java |
// Building Distributed Object Applications with CORBA // Infowave (Thailand) Co., Ltd. // http://www.waveman.com // Jan 1998 public class AircraftCarrierImpl implements Ship.AircraftCarrierOperations { // data member and constructor for TIE private org.omg.CORBA.BOA _boa;
public Ship.Aircraft launch(String name) {
_boa.obj_is_ready(aircraft); System.out.println(aircraft + " on Catapult 2"); return aircraft;
|
AircraftImpl.java |
// Building Distributed Object Applications with CORBA // Infowave (Thailand) Co., Ltd. // http://www.waveman.com // Jan 1998 public class AircraftImpl implements Ship.AircraftOperations { private String _codeNumber; public AircraftImpl(String codeNumber) {
public String codeNumber() {
public void attitude(org.omg.CORBA.IntHolder altiude, String
direction) {
|
Building the server: Create a directory and place Ship.idl, Server.java, AircraftCarrierImpl.java, and AircraftImpl.java into it.
|
prompt> idl2java Ship.idl prompt> vbjc Server.java |
Running the program: You should have previously built the client.
|
prompt> osagent prompt> vbj Server prompt> vbj Client Nimitz "Ghost 202" |