2015-06-01 11:35:03 -07:00
|
|
|
|
//: remote/DisplayPerfectTime.java
|
2015-06-02 11:55:14 -07:00
|
|
|
|
// <20>2015 MindView LLC: see Copyright.txt
|
2015-06-01 11:35:03 -07:00
|
|
|
|
// Uses remote object PerfectTime
|
|
|
|
|
// {ValidateByHand}
|
|
|
|
|
import java.rmi.registry.*;
|
|
|
|
|
|
|
|
|
|
public class DisplayPerfectTime {
|
|
|
|
|
public static void
|
|
|
|
|
main(String[] args) throws Exception {
|
2015-06-02 11:55:14 -07:00
|
|
|
|
Registry reg =
|
|
|
|
|
LocateRegistry.getRegistry("localhost");
|
|
|
|
|
PerfectTime pt =
|
|
|
|
|
(PerfectTime)reg.lookup("PerfectTime");
|
2015-06-01 11:35:03 -07:00
|
|
|
|
for(int i = 0; i < 10; i++)
|
2015-06-02 11:55:14 -07:00
|
|
|
|
System.out.println("Time: "+ pt.getPerfectTime());
|
2015-06-01 11:35:03 -07:00
|
|
|
|
}
|
|
|
|
|
} ///:~
|