New service group world order. My enthusiasm for widening is being stretched.

git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@177 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Michael Bayne
2007-02-11 01:37:46 +00:00
parent 61d8f478e1
commit 75b34c6bf6
16 changed files with 287 additions and 353 deletions
@@ -29,11 +29,12 @@ import com.threerings.crowd.server.PlaceRegistry;
import com.threerings.whirled.server.SceneRegistry;
import com.threerings.whirled.zone.Log;
import com.threerings.whirled.zone.data.ZoneCodes;
import com.threerings.whirled.zone.util.ZoneUtil;
/**
* The zone registry takes care of mapping zone requests to the
* appropriate registered zone manager.
* The zone registry takes care of mapping zone requests to the appropriate registered zone
* manager.
*/
public class ZoneRegistry
{
@@ -43,29 +44,25 @@ public class ZoneRegistry
/**
* Creates a zone manager with the supplied configuration.
*/
public ZoneRegistry (InvocationManager invmgr, PlaceRegistry plreg,
SceneRegistry screg)
public ZoneRegistry (InvocationManager invmgr, PlaceRegistry plreg, SceneRegistry screg)
{
// create a zone provider and register it with the invocation
// services
// create a zone provider and register it with the invocation services
zoneprov = new ZoneProvider(plreg.locprov, this, screg);
invmgr.registerDispatcher(new ZoneDispatcher(zoneprov), true);
invmgr.registerDispatcher(new ZoneDispatcher(zoneprov), ZoneCodes.WHIRLED_GROUP);
}
/**
* Registers the supplied zone manager as the manager for the
* specified zone type. Zone types are 7 bits and managers are
* responsible for making sure they don't use a zone type that
* collides with another manager (given that we have only three zone
* types at present, this doesn't seem unreasonable).
* Registers the supplied zone manager as the manager for the specified zone type. Zone types
* are 7 bits and managers are responsible for making sure they don't use a zone type that
* collides with another manager (given that we have only three zone types at present, this
* doesn't seem unreasonable).
*/
public void registerZoneManager (byte zoneType, ZoneManager manager)
{
ZoneManager old = (ZoneManager)_managers.get(zoneType);
if (old != null) {
Log.warning("Zone manager already registered with requested " +
"type [type=" + zoneType + ", old=" + old +
", new=" + manager + "].");
Log.warning("Zone manager already registered with requested type [type=" + zoneType +
", old=" + old + ", new=" + manager + "].");
} else {
_managers.put(zoneType, manager);
}
@@ -74,8 +71,7 @@ public class ZoneRegistry
/**
* Returns the zone manager that handles the specified zone id.
*
* @param qualifiedZoneId the qualified zone id for which the manager
* should be looked up.
* @param qualifiedZoneId the qualified zone id for which the manager should be looked up.
*/
public ZoneManager getZoneManager (int qualifiedZoneId)
{