/** * File: MapStringSetBaseImpl.java * Content: Implementation of the MapStringSet * Author: LuisM Pena * Date: 1st December 2001 * Version: 0.29.00 * Last changes: * **/ package sensei.middleware.gmns; import java.rmi.RemoteException; import java.rmi.server.UnicastRemoteObject; /** * Implementation of the MapStringSet RMI interface. **/ public abstract class MapStringSetBaseImpl extends UnicastRemoteObject implements MapStringSet { public MapStringSetBaseImpl() throws Exception { thisMapStringSet=this; } public MapStringSetBaseImpl(boolean activate) throws Exception { if (!activate) deactivate(); } public void activate() throws Exception { if (thisMapStringSet==null) { thisMapStringSet=this; exportObject(this); } } public void deactivate() throws RemoteException { synchronized (this) { if (thisMapStringSet!=null) unexportObject(thisMapStringSet,true); thisMapStringSet=null; } } public final MapStringSet theMapStringSet() { return thisMapStringSet; } protected MapStringSet thisMapStringSet; }