Renamed OccupantManager to OccupantDirector.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1239 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Walter Korman
2002-04-15 14:38:46 +00:00
parent a6646a939a
commit f6fedf5bdf
10 changed files with 43 additions and 43 deletions
@@ -1,5 +1,5 @@
// //
// $Id: OccupantManager.java,v 1.11 2002/03/18 23:21:25 mdb Exp $ // $Id: OccupantDirector.java,v 1.1 2002/04/15 14:38:45 shaper Exp $
package com.threerings.crowd.client; package com.threerings.crowd.client;
@@ -15,8 +15,8 @@ import com.threerings.crowd.data.PlaceObject;
import com.threerings.crowd.util.CrowdContext; import com.threerings.crowd.util.CrowdContext;
/** /**
* The occupant manager listens for occupants of places to enter and exit, * The occupant director listens for occupants of places to enter and
* and dispatches notices to interested parties about these events. * exit, and dispatches notices to interested parties about these events.
* *
* <p> It will eventually provide a framework for keeping track of * <p> It will eventually provide a framework for keeping track of
* occupant information in a network efficient manner. The idea being that * occupant information in a network efficient manner. The idea being that
@@ -35,13 +35,13 @@ import com.threerings.crowd.util.CrowdContext;
* can update non-static occupant data rather than permanently using * can update non-static occupant data rather than permanently using
* what's in the cache. * what's in the cache.
*/ */
public class OccupantManager public class OccupantDirector
implements LocationObserver, SetListener implements LocationObserver, SetListener
{ {
/** /**
* Constructs a new occupant manager with the supplied context. * Constructs a new occupant director with the supplied context.
*/ */
public OccupantManager (CrowdContext ctx) public OccupantDirector (CrowdContext ctx)
{ {
// register ourselves as a location observer // register ourselves as a location observer
ctx.getLocationDirector().addLocationObserver(this); ctx.getLocationDirector().addLocationObserver(this);
@@ -1,5 +1,5 @@
// //
// $Id: OccupantObserver.java,v 1.2 2001/10/11 04:07:51 mdb Exp $ // $Id: OccupantObserver.java,v 1.3 2002/04/15 14:38:45 shaper Exp $
package com.threerings.crowd.client; package com.threerings.crowd.client;
@@ -8,7 +8,7 @@ import com.threerings.crowd.data.OccupantInfo;
/** /**
* An entity that is interested in hearing about bodies that enter and * An entity that is interested in hearing about bodies that enter and
* leave a location (as well as disconnect and reconnect) can implement * leave a location (as well as disconnect and reconnect) can implement
* this interface and register itself with the {@link OccupantManager}. * this interface and register itself with the {@link OccupantDirector}.
*/ */
public interface OccupantObserver public interface OccupantObserver
{ {
@@ -1,11 +1,11 @@
// //
// $Id: CrowdContext.java,v 1.6 2001/10/11 04:07:51 mdb Exp $ // $Id: CrowdContext.java,v 1.7 2002/04/15 14:38:45 shaper Exp $
package com.threerings.crowd.util; package com.threerings.crowd.util;
import com.threerings.presents.util.PresentsContext; import com.threerings.presents.util.PresentsContext;
import com.threerings.crowd.client.LocationDirector; import com.threerings.crowd.client.LocationDirector;
import com.threerings.crowd.client.OccupantManager; import com.threerings.crowd.client.OccupantDirector;
import com.threerings.crowd.client.PlaceView; import com.threerings.crowd.client.PlaceView;
/** /**
@@ -20,9 +20,9 @@ public interface CrowdContext extends PresentsContext
public LocationDirector getLocationDirector (); public LocationDirector getLocationDirector ();
/** /**
* Returns a reference to the occupant manager. * Returns a reference to the occupant director.
*/ */
public OccupantManager getOccupantManager (); public OccupantDirector getOccupantDirector ();
/** /**
* When the client enters a new place, the location director creates a * When the client enters a new place, the location director creates a
@@ -1,5 +1,5 @@
// //
// $Id: ChatPanel.java,v 1.12 2002/02/26 05:48:11 mdb Exp $ // $Id: ChatPanel.java,v 1.13 2002/04/15 14:38:45 shaper Exp $
package com.threerings.micasa.client; package com.threerings.micasa.client;
@@ -59,7 +59,7 @@ public class ChatPanel
_chatdtr.addChatDisplay(this); _chatdtr.addChatDisplay(this);
// register as an occupant observer // register as an occupant observer
_ctx.getOccupantManager().addOccupantObserver(this); _ctx.getOccupantDirector().addOccupantObserver(this);
GroupLayout gl = new VGroupLayout(GroupLayout.STRETCH); GroupLayout gl = new VGroupLayout(GroupLayout.STRETCH);
gl.setOffAxisPolicy(GroupLayout.STRETCH); gl.setOffAxisPolicy(GroupLayout.STRETCH);
@@ -1,5 +1,5 @@
// //
// $Id: MiCasaClient.java,v 1.11 2002/03/28 22:32:31 mdb Exp $ // $Id: MiCasaClient.java,v 1.12 2002/04/15 14:38:45 shaper Exp $
package com.threerings.micasa.client; package com.threerings.micasa.client;
@@ -15,7 +15,7 @@ import com.threerings.presents.client.Client;
import com.threerings.presents.dobj.DObjectManager; import com.threerings.presents.dobj.DObjectManager;
import com.threerings.crowd.client.LocationDirector; import com.threerings.crowd.client.LocationDirector;
import com.threerings.crowd.client.OccupantManager; import com.threerings.crowd.client.OccupantDirector;
import com.threerings.crowd.client.PlaceView; import com.threerings.crowd.client.PlaceView;
import com.threerings.parlor.client.ParlorDirector; import com.threerings.parlor.client.ParlorDirector;
@@ -99,7 +99,7 @@ public class MiCasaClient
// create our managers and directors // create our managers and directors
_locdir = new LocationDirector(_ctx); _locdir = new LocationDirector(_ctx);
_occmgr = new OccupantManager(_ctx); _occdir = new OccupantDirector(_ctx);
_pardtr = new ParlorDirector(_ctx); _pardtr = new ParlorDirector(_ctx);
_msgmgr = new MessageManager(MESSAGE_MANAGER_PREFIX); _msgmgr = new MessageManager(MESSAGE_MANAGER_PREFIX);
} }
@@ -142,9 +142,9 @@ public class MiCasaClient
return _locdir; return _locdir;
} }
public OccupantManager getOccupantManager () public OccupantDirector getOccupantDirector ()
{ {
return _occmgr; return _occdir;
} }
public ParlorDirector getParlorDirector () public ParlorDirector getParlorDirector ()
@@ -174,7 +174,7 @@ public class MiCasaClient
protected Client _client; protected Client _client;
protected LocationDirector _locdir; protected LocationDirector _locdir;
protected OccupantManager _occmgr; protected OccupantDirector _occdir;
protected ParlorDirector _pardtr; protected ParlorDirector _pardtr;
protected MessageManager _msgmgr; protected MessageManager _msgmgr;
@@ -1,5 +1,5 @@
// //
// $Id: OccupantList.java,v 1.5 2002/03/18 23:21:26 mdb Exp $ // $Id: OccupantList.java,v 1.6 2002/04/15 14:38:45 shaper Exp $
package com.threerings.micasa.client; package com.threerings.micasa.client;
@@ -35,7 +35,7 @@ public class OccupantList
_ctx = ctx; _ctx = ctx;
// register ourselves as an occupant observer // register ourselves as an occupant observer
_ctx.getOccupantManager().addOccupantObserver(this); _ctx.getOccupantDirector().addOccupantObserver(this);
} }
// documentation inherited // documentation inherited
@@ -1,5 +1,5 @@
// //
// $Id: SimpleClient.java,v 1.3 2002/03/28 22:32:32 mdb Exp $ // $Id: SimpleClient.java,v 1.4 2002/04/15 14:38:45 shaper Exp $
package com.threerings.micasa.simulator.client; package com.threerings.micasa.simulator.client;
@@ -15,7 +15,7 @@ import com.threerings.presents.client.Client;
import com.threerings.presents.dobj.DObjectManager; import com.threerings.presents.dobj.DObjectManager;
import com.threerings.crowd.client.LocationDirector; import com.threerings.crowd.client.LocationDirector;
import com.threerings.crowd.client.OccupantManager; import com.threerings.crowd.client.OccupantDirector;
import com.threerings.crowd.client.PlaceView; import com.threerings.crowd.client.PlaceView;
import com.threerings.parlor.client.ParlorDirector; import com.threerings.parlor.client.ParlorDirector;
@@ -38,7 +38,7 @@ public class SimpleClient
// create our managers and directors // create our managers and directors
_locdir = new LocationDirector(_ctx); _locdir = new LocationDirector(_ctx);
_occmgr = new OccupantManager(_ctx); _occdir = new OccupantDirector(_ctx);
_pardtr = new ParlorDirector(_ctx); _pardtr = new ParlorDirector(_ctx);
// for test purposes, hardcode the server info // for test purposes, hardcode the server info
@@ -95,9 +95,9 @@ public class SimpleClient
return _locdir; return _locdir;
} }
public OccupantManager getOccupantManager () public OccupantDirector getOccupantDirector ()
{ {
return _occmgr; return _occdir;
} }
public ParlorDirector getParlorDirector () public ParlorDirector getParlorDirector ()
@@ -117,7 +117,7 @@ public class SimpleClient
protected Client _client; protected Client _client;
protected LocationDirector _locdir; protected LocationDirector _locdir;
protected OccupantManager _occmgr; protected OccupantDirector _occdir;
protected ParlorDirector _pardtr; protected ParlorDirector _pardtr;
} }
@@ -1,5 +1,5 @@
// //
// $Id: TestClient.java,v 1.9 2002/03/28 22:32:33 mdb Exp $ // $Id: TestClient.java,v 1.10 2002/04/15 14:38:45 shaper Exp $
package com.threerings.crowd.client; package com.threerings.crowd.client;
@@ -23,7 +23,7 @@ public class TestClient
// create the handles on our various services // create the handles on our various services
_client = new Client(creds, this); _client = new Client(creds, this);
_locdir = new LocationDirector(_ctx); _locdir = new LocationDirector(_ctx);
_occmgr = new OccupantManager(_ctx); _occdir = new OccupantDirector(_ctx);
// we want to know about logon/logoff // we want to know about logon/logoff
_client.addClientObserver(this); _client.addClientObserver(this);
@@ -109,9 +109,9 @@ public class TestClient
return _locdir; return _locdir;
} }
public OccupantManager getOccupantManager () public OccupantDirector getOccupantDirector ()
{ {
return _occmgr; return _occdir;
} }
public void setPlaceView (PlaceView view) public void setPlaceView (PlaceView view)
@@ -122,7 +122,7 @@ public class TestClient
protected Client _client; protected Client _client;
protected LocationDirector _locdir; protected LocationDirector _locdir;
protected OccupantManager _occmgr; protected OccupantDirector _occdir;
protected CrowdContext _ctx; protected CrowdContext _ctx;
protected Queue _queue = new Queue(); protected Queue _queue = new Queue();
@@ -1,5 +1,5 @@
// //
// $Id: TestClient.java,v 1.7 2002/03/28 22:32:33 mdb Exp $ // $Id: TestClient.java,v 1.8 2002/04/15 14:38:45 shaper Exp $
package com.threerings.parlor; package com.threerings.parlor;
@@ -29,7 +29,7 @@ public class TestClient
// create the handles on our various services // create the handles on our various services
_client = new Client(creds, this); _client = new Client(creds, this);
_locdir = new LocationDirector(_ctx); _locdir = new LocationDirector(_ctx);
_occmgr = new OccupantManager(_ctx); _occdir = new OccupantDirector(_ctx);
_pardtr = new ParlorDirector(_ctx); _pardtr = new ParlorDirector(_ctx);
// register ourselves as the invitation handler // register ourselves as the invitation handler
@@ -159,9 +159,9 @@ public class TestClient
return _locdir; return _locdir;
} }
public OccupantManager getOccupantManager () public OccupantDirector getOccupantDirector ()
{ {
return _occmgr; return _occdir;
} }
public void setPlaceView (PlaceView view) public void setPlaceView (PlaceView view)
@@ -177,7 +177,7 @@ public class TestClient
protected Client _client; protected Client _client;
protected LocationDirector _locdir; protected LocationDirector _locdir;
protected OccupantManager _occmgr; protected OccupantDirector _occdir;
protected ParlorDirector _pardtr; protected ParlorDirector _pardtr;
protected ParlorContext _ctx; protected ParlorContext _ctx;
@@ -1,5 +1,5 @@
// //
// $Id: TestClient.java,v 1.11 2002/03/28 22:32:34 mdb Exp $ // $Id: TestClient.java,v 1.12 2002/04/15 14:38:46 shaper Exp $
package com.threerings.whirled; package com.threerings.whirled;
@@ -29,7 +29,7 @@ public class TestClient
// create the handles for our various services // create the handles for our various services
_client = new Client(creds, this); _client = new Client(creds, this);
_screp = new DummyClientSceneRepository(); _screp = new DummyClientSceneRepository();
_occmgr = new OccupantManager(_ctx); _occdir = new OccupantDirector(_ctx);
_locdir = new LocationDirector(_ctx); _locdir = new LocationDirector(_ctx);
_scdir = new SceneDirector( _scdir = new SceneDirector(
_ctx, _locdir, _screp, new DefaultDisplaySceneFactory()); _ctx, _locdir, _screp, new DefaultDisplaySceneFactory());
@@ -139,9 +139,9 @@ public class TestClient
return _locdir; return _locdir;
} }
public OccupantManager getOccupantManager () public OccupantDirector getOccupantDirector ()
{ {
return _occmgr; return _occdir;
} }
public void setPlaceView (PlaceView view) public void setPlaceView (PlaceView view)
@@ -158,7 +158,7 @@ public class TestClient
protected Client _client; protected Client _client;
protected LocationDirector _locdir; protected LocationDirector _locdir;
protected SceneDirector _scdir; protected SceneDirector _scdir;
protected OccupantManager _occmgr; protected OccupantDirector _occdir;
protected SceneRepository _screp; protected SceneRepository _screp;
protected WhirledContext _ctx; protected WhirledContext _ctx;