We've always been at war with Eurasia. Changed InvocationManager to

InvocationDirector (please god let the renaming be done). Removed IntMap
and modified code to use samskivert's HashIntMap.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@375 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2001-10-02 02:08:16 +00:00
parent 1f663669c9
commit 6620936a04
13 changed files with 73 additions and 295 deletions
@@ -1,13 +1,13 @@
//
// $Id: SceneDirector.java,v 1.3 2001/10/01 22:16:02 mdb Exp $
// $Id: SceneDirector.java,v 1.4 2001/10/02 02:08:16 mdb Exp $
package com.threerings.whirled.client;
import java.io.IOException;
import com.samskivert.util.HashIntMap;
import com.threerings.cocktail.cher.dobj.DObject;
import com.threerings.cocktail.cher.dobj.ObjectAccessException;
import com.threerings.cocktail.cher.util.IntMap;
import com.threerings.cocktail.party.client.LocationDirector;
import com.threerings.cocktail.party.client.LocationObserver;
@@ -200,7 +200,7 @@ public class SceneDirector
protected WhirledContext _ctx;
protected SceneRepository _screp;
protected IntMap _scache = new IntMap();
protected HashIntMap _scache = new HashIntMap();
/** The scene object of the scene we currently occupy. */
protected Scene _scene;
@@ -1,10 +1,10 @@
//
// $Id: SceneService.java,v 1.3 2001/10/01 22:16:02 mdb Exp $
// $Id: SceneService.java,v 1.4 2001/10/02 02:08:16 mdb Exp $
package com.threerings.whirled.client;
import com.threerings.cocktail.cher.client.Client;
import com.threerings.cocktail.cher.client.InvocationManager;
import com.threerings.cocktail.cher.client.InvocationDirector;
import com.threerings.whirled.Log;
@@ -25,10 +25,10 @@ public class SceneService implements SceneCodes
public static void moveTo (Client client, int sceneId,
int sceneVers, SceneDirector rsptarget)
{
InvocationManager invmgr = client.getInvocationManager();
InvocationDirector invdir = client.getInvocationDirector();
Object[] args = new Object[] {
new Integer(sceneId), new Integer(sceneVers) };
invmgr.invoke(MODULE_NAME, MOVE_TO_REQUEST, args, rsptarget);
invdir.invoke(MODULE_NAME, MOVE_TO_REQUEST, args, rsptarget);
Log.info("Sent moveTo request [scene=" + sceneId +
", version=" + sceneVers + "].");
}
@@ -1,13 +1,13 @@
//
// $Id: SceneRegistry.java,v 1.2 2001/08/14 06:51:07 mdb Exp $
// $Id: SceneRegistry.java,v 1.3 2001/10/02 02:08:16 mdb Exp $
package com.threerings.whirled.server;
import java.util.ArrayList;
import java.util.Properties;
import com.samskivert.util.HashIntMap;
import com.threerings.cocktail.cher.util.Invoker;
import com.threerings.cocktail.cher.util.IntMap;
import com.threerings.cocktail.party.server.PartyServer;
@@ -159,14 +159,14 @@ public class SceneRegistry
// that is finally complete, then we can let our penders know
// what's up
// we'll eventually want to load up the proper properties file for
// the scene, but for now let's punt
try {
Properties props = new Properties();
SceneManager scmgr = (SceneManager)
PartyServer.plreg.createPlace(
SceneObject.class, SceneManager.class, props);
// configure the scene manager with references to useful stuff
PartyServer.plreg.createPlace(SceneManager.class);
// configure the scene manager with references to useful
// stuff; we'll somehow need to convey configuration
// information for the scene to the scene manager, but for now
// let's punt
scmgr.postInit(scene, this);
// when the scene manager completes its startup procedings, it
@@ -223,6 +223,6 @@ public class SceneRegistry
protected SceneRepository _screp;
protected Invoker _invoker;
protected IntMap _scenemgrs = new IntMap();
protected IntMap _penders = new IntMap();
protected HashIntMap _scenemgrs = new HashIntMap();
protected HashIntMap _penders = new HashIntMap();
}
@@ -1,5 +1,5 @@
//
// $Id: WhirledServer.java,v 1.4 2001/09/28 22:32:28 mdb Exp $
// $Id: WhirledServer.java,v 1.5 2001/10/02 02:08:16 mdb Exp $
package com.threerings.whirled.server;
@@ -61,7 +61,7 @@ public class WhirledServer extends PartyServer
* provider, it can override this method. The default mechanism is to
* load a properties file referenced by <code>dbmap</code> in the
* whirled server configuration and use those properties to create a
* {@link com.samskivert.jdbc.StaticConnectionProvider}.
* {@link StaticConnectionProvider}.
*
* @exception Exception thrown if an error occurs creating the
* connection provider.