The first great Three Rings renaming. Cocktail changed to Narya, Cher

changed to Presents and Party changed to Crowd. Whee!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@431 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2001-10-11 04:07:54 +00:00
parent ac477756ea
commit 8a4c46badc
170 changed files with 832 additions and 805 deletions
@@ -1,16 +1,16 @@
//
// $Id: CrowdClient.java,v 1.2 2001/08/04 01:55:41 mdb Exp $
// $Id: CrowdClient.java,v 1.3 2001/10/11 04:07:51 mdb Exp $
package com.threerings.cocktail.party.server;
package com.threerings.crowd.server;
import com.threerings.cocktail.cher.server.CherClient;
import com.threerings.cocktail.party.data.BodyObject;
import com.threerings.presents.server.PresentsClient;
import com.threerings.crowd.data.BodyObject;
/**
* The party client extends the cher client and does some initializations
* necessary for the party services.
* The crowd client extends the presents client and does some
* initializations necessary for the crowd services.
*/
public class PartyClient extends CherClient
public class CrowdClient extends PresentsClient
{
protected void sessionWillStart ()
{
@@ -23,7 +23,7 @@ public class PartyClient extends CherClient
_bodobj.setUsername(_username);
// register our body object mapping
PartyServer.mapBody(_username, _bodobj);
CrowdServer.mapBody(_username, _bodobj);
}
protected void sessionWillResume ()
@@ -38,7 +38,7 @@ public class PartyClient extends CherClient
super.sessionDidTerminate();
// unregister our body object mapping
PartyServer.unmapBody(_username);
CrowdServer.unmapBody(_username);
}
protected BodyObject _bodobj;
@@ -1,23 +1,23 @@
//
// $Id: CrowdServer.java,v 1.7 2001/09/28 22:32:28 mdb Exp $
// $Id: CrowdServer.java,v 1.8 2001/10/11 04:07:51 mdb Exp $
package com.threerings.cocktail.party.server;
package com.threerings.crowd.server;
import java.util.HashMap;
import com.threerings.cocktail.cher.server.CherServer;
import com.threerings.presents.server.PresentsServer;
import com.threerings.cocktail.party.Log;
import com.threerings.cocktail.party.data.BodyObject;
import com.threerings.crowd.Log;
import com.threerings.crowd.data.BodyObject;
/**
* The party server extends the cher server by configuring it to use the
* extensions provided by the party layer to support party services.
* The crowd server extends the presents server by configuring it to use the
* extensions provided by the crowd layer to support crowd services.
*/
public class PartyServer extends CherServer
public class CrowdServer extends PresentsServer
{
/** The namespace used for server config properties. */
public static final String CONFIG_KEY = "party";
public static final String CONFIG_KEY = "crowd";
/** The place registry. */
public static PlaceRegistry plreg;
@@ -28,14 +28,14 @@ public class PartyServer extends CherServer
public void init ()
throws Exception
{
// do the cher server initialization
// do the presents server initialization
super.init();
// bind the party server config into the namespace
// bind the crowd server config into the namespace
config.bindProperties(CONFIG_KEY, CONFIG_PATH, true);
// configure the client to use our party client
clmgr.setClientClass(PartyClient.class);
// configure the client to use our crowd client
clmgr.setClientClass(CrowdClient.class);
// configure the client to use the body object
clmgr.setClientObjectClass(BodyObject.class);
@@ -46,11 +46,11 @@ public class PartyServer extends CherServer
// register our invocation service providers
registerProviders(config.getValue(PROVIDERS_KEY, (String[])null));
Log.info("Party server initialized.");
Log.info("Crowd server initialized.");
}
/**
* The party server maintains a mapping of username to body object for
* The crowd server maintains a mapping of username to body object for
* all active users on the server. This should only be called from the
* dobjmgr thread.
*/
@@ -60,7 +60,7 @@ public class PartyServer extends CherServer
}
/**
* Called by the party client to map a username to a particular body
* Called by the crowd client to map a username to a particular body
* object. This should only be called from the dobjmgr thread.
*/
protected static void mapBody (String username, BodyObject bodobj)
@@ -69,7 +69,7 @@ public class PartyServer extends CherServer
}
/**
* Called by the party client to unmap a username from a particular
* Called by the crowd client to unmap a username from a particular
* body object. This should only be called from the dobjmgr thread.
*/
protected static void unmapBody (String username)
@@ -79,7 +79,7 @@ public class PartyServer extends CherServer
public static void main (String[] args)
{
PartyServer server = new PartyServer();
CrowdServer server = new CrowdServer();
try {
server.init();
server.run();
@@ -94,7 +94,7 @@ public class PartyServer extends CherServer
// the path to the config file
protected final static String CONFIG_PATH =
"rsrc/config/cocktail/party/server";
"rsrc/config/crowd/server";
// the config key for our list of invocation provider mappings
protected final static String PROVIDERS_KEY = CONFIG_KEY + ".providers";
@@ -1,16 +1,16 @@
//
// $Id: LocationProvider.java,v 1.9 2001/10/05 23:57:26 mdb Exp $
// $Id: LocationProvider.java,v 1.10 2001/10/11 04:07:51 mdb Exp $
package com.threerings.cocktail.party.server;
package com.threerings.crowd.server;
import com.threerings.cocktail.cher.dobj.DObject;
import com.threerings.cocktail.cher.server.InvocationProvider;
import com.threerings.cocktail.cher.server.ServiceFailedException;
import com.threerings.presents.dobj.DObject;
import com.threerings.presents.server.InvocationProvider;
import com.threerings.presents.server.ServiceFailedException;
import com.threerings.cocktail.party.Log;
import com.threerings.cocktail.party.client.LocationCodes;
import com.threerings.cocktail.party.data.*;
import com.threerings.cocktail.party.server.PartyServer;
import com.threerings.crowd.Log;
import com.threerings.crowd.client.LocationCodes;
import com.threerings.crowd.data.*;
import com.threerings.crowd.server.CrowdServer;
/**
* This class provides the server end of the location services.
@@ -52,7 +52,7 @@ public class LocationProvider
int bodoid = source.getOid();
// make sure the place in question actually exists
PlaceManager pmgr = PartyServer.plreg.getPlaceManager(placeId);
PlaceManager pmgr = CrowdServer.plreg.getPlaceManager(placeId);
if (pmgr == null) {
Log.info("Requested to move to non-existent place " +
"[source=" + source + ", place=" + placeId + "].");
@@ -78,7 +78,7 @@ public class LocationProvider
// remove them from the occupant list of the previous location
try {
PlaceObject pold = (PlaceObject)
PartyServer.omgr.getObject(source.location);
CrowdServer.omgr.getObject(source.location);
if (pold != null) {
Object key = new Integer(bodoid);
// remove their occupant info (which is keyed on oid)
@@ -1,15 +1,15 @@
//
// $Id: PlaceManager.java,v 1.16 2001/10/09 18:41:01 mdb Exp $
// $Id: PlaceManager.java,v 1.17 2001/10/11 04:07:51 mdb Exp $
package com.threerings.cocktail.party.server;
package com.threerings.crowd.server;
import java.util.HashMap;
import java.util.Properties;
import com.threerings.cocktail.cher.dobj.*;
import com.threerings.presents.dobj.*;
import com.threerings.cocktail.party.Log;
import com.threerings.cocktail.party.data.*;
import com.threerings.crowd.Log;
import com.threerings.crowd.data.*;
/**
* The place manager is the server-side entity that handles all
@@ -18,7 +18,7 @@ import com.threerings.cocktail.party.data.*;
* places) should live in the place manager. An intelligently constructed
* hierarchy of place manager classes working in concert with invocation
* services should provide the majority of the server-side functionality
* of an application built on the Cocktail platform.
* of an application built on the Presents platform.
*
* <p> The base place manager class takes care of the necessary
* interactions with the place registry to manage place registration. It
@@ -1,7 +1,7 @@
//
// $Id: PlaceRegistry.java,v 1.10 2001/10/05 23:57:26 mdb Exp $
// $Id: PlaceRegistry.java,v 1.11 2001/10/11 04:07:51 mdb Exp $
package com.threerings.cocktail.party.server;
package com.threerings.crowd.server;
import java.util.Iterator;
@@ -9,11 +9,11 @@ import com.samskivert.util.Config;
import com.samskivert.util.HashIntMap;
import com.samskivert.util.Queue;
import com.threerings.cocktail.cher.dobj.*;
import com.threerings.presents.dobj.*;
import com.threerings.cocktail.party.Log;
import com.threerings.cocktail.party.data.PlaceConfig;
import com.threerings.cocktail.party.data.PlaceObject;
import com.threerings.crowd.Log;
import com.threerings.crowd.data.PlaceConfig;
import com.threerings.crowd.data.PlaceObject;
/**
* The place registry keeps track of all of the active places in the
@@ -65,7 +65,7 @@ public class PlaceRegistry implements Subscriber
_createq.append(pmgr);
// and request to create the place object
PartyServer.omgr.createObject(
CrowdServer.omgr.createObject(
pmgr.getPlaceObjectClass(), this, false);
return pmgr;