module examples.migration; /** * This program assumes that an agent has been started with examples.migration.Agent * It receives a Universal Actor Name (UAN) and sends a printItinerary() * message to that actor. */ behavior RemoteSend { public void act(String[] args){ try { UniversalActor a = (UniversalActor)UniversalActor.getReferenceByName( new UAN(args[0]) ); a<-printItinerary(); } catch (ArrayIndexOutOfBoundsException e){ standardOutput<-println("Usage: java migration.RemoteSend "); } catch (MalformedUANException e) { standardError<-println("Error creating UAN: " + e); } } }