// StreetRouterImpl.java // Implementation of the StreetRouter CORBA object on an applet import java.util.*; import java.io.*; import java.net.*; public class StreetRouterImpl extends Proxy._StreetRouterImplBase { // Constructor of this class public StreetRouterImpl (String name) { super(name); return; } // Implementation of the method lookupdirections // The parameters would something like: // frocity: stanford // fromstate: california // tocity: san francisco // tostate: california // // The result of calling this method is a string with street directions // from one point ot the other // Because this is running in an Applet, due to security reasons the // applet cannot establish a connection to other server rather than the // one is running. So, for this example this proxy returns a fake // result. public String lookupdirections(String fromcity, String fromstate, String tocity, String tostate) { String result = "Because this is running in an Applet, due to security reasons the applet cannot establish a connection to other server rather than the one is running. So, for this example this proxy returns a fake result."; System.out.println(result); return result; } }