import java.rmi.*;
import
java.rmi.server.UnicastRemoteObject;
import java.util.Vector;
public class ShapeListServant
extends UnicastRemoteObject implements ShapeList
{
private Vector
theList; // contains the
list of Shapes 1
private int
version;
public ShapeListServant()throws RemoteException{...}
public Shape newShape(GraphicalObject g) throws RemoteException { 2
version++;
Shape s = new ShapeServant( g, version); 3
theList.addElement(s);
return s;
}
public Vector
allShapes()throws RemoteException{...}
public
int getVersion() throws RemoteException { ... }
}