Java Reference
In-Depth Information
Figure 9-5. The relationship between two Xlets and an object they share
Implementing a Shared Object
Consider an Xlet with explicit access to a network that wants to share data with other
applications. You must wrap this data in a remotable class, as you see in Listing 9-7.
Listing 9-7. A Data Wrapper Class Exported Using IXC
import java.rmi.*;
public class Location
implements java.rmi.Remote {
private String location;
private String forecast;
public Location() {
}
public void setLocation(String l)
throws RemoteException {
location = l;
}
 
Search WWH ::




Custom Search