2015-09-07 11:44:36 -06:00
|
|
|
// remote/DisplayPerfectTime.java
|
2015-06-15 17:47:35 -07:00
|
|
|
// Uses remote object PerfectTime
|
|
|
|
// {ValidateByHand}
|
|
|
|
import java.rmi.registry.*;
|
|
|
|
|
|
|
|
public class DisplayPerfectTime {
|
|
|
|
public static void
|
|
|
|
main(String[] args) throws Exception {
|
|
|
|
Registry reg =
|
|
|
|
LocateRegistry.getRegistry("localhost");
|
|
|
|
PerfectTime pt =
|
|
|
|
(PerfectTime)reg.lookup("PerfectTime");
|
|
|
|
for(int i = 0; i < 10; i++)
|
|
|
|
System.out.println("Time: "+ pt.getPerfectTime());
|
|
|
|
}
|
2015-09-07 11:44:36 -06:00
|
|
|
}
|