/Users/lyon/j4p/src/net/rmi/armi/AHelloWorld.java

1    package net.rmi.armi; 
2     
3    import java.util.*; 
4     
5    public class AHelloWorld 
6            extends Observable { 
7        HelloWorld hw = new HelloWorld(); 
8     
9        public AHelloWorld() { 
10       } 
11    
12       public void getMsg() { 
13           Thread t = new Thread(new Runnable() { 
14               public void run() { 
15                   Object o = hw.getMsg(); 
16                   setChanged(); 
17                   notifyObservers(o); 
18               } 
19           }); 
20           t.start(); 
21       } 
22    
23       public void testGetMsg() { 
24           Thread t = new Thread(new Runnable() { 
25               public void run() { 
26                    hw.testGetMsg(); 
27               } 
28           }); 
29           t.start(); 
30       } 
31    
32   } 
33