Automatically create and register a zone provider in the zone registry.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@730 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2001-12-04 01:06:33 +00:00
parent 69b4f7fa86
commit 1bf2c4b727
2 changed files with 14 additions and 6 deletions
@@ -1,5 +1,5 @@
//
// $Id: ZoneProvider.java,v 1.1 2001/12/04 00:31:58 mdb Exp $
// $Id: ZoneProvider.java,v 1.2 2001/12/04 01:06:33 mdb Exp $
package com.threerings.whirled.zone.server;
@@ -30,9 +30,9 @@ public class ZoneProvider
{
/**
* Constructs a zone provider that will interoperate with the supplied
* zone and scene registries. A system that wishes to use the zone
* services must instantiate a zone provider and register it with the
* invocation services.
* zone and scene registries. The zone provider will automatically be
* constructed and registered by the {@link ZoneRegistry}, which a
* zone-using system must create and initialize in their server.
*/
public ZoneProvider (ZoneRegistry zonereg, SceneRegistry screg)
{
@@ -1,12 +1,15 @@
//
// $Id: ZoneRegistry.java,v 1.1 2001/12/04 00:31:58 mdb Exp $
// $Id: ZoneRegistry.java,v 1.2 2001/12/04 01:06:33 mdb Exp $
package com.threerings.whirled.zone.server;
import com.samskivert.util.Config;
import com.samskivert.util.HashIntMap;
import com.threerings.presents.server.InvocationManager;
import com.threerings.whirled.Log;
import com.threerings.whirled.server.SceneRegistry;
/**
* The zone registry takes care of mapping zone requests to the
@@ -17,8 +20,13 @@ public class ZoneRegistry
/**
* Creates a zone manager with the supplied configuration.
*/
public ZoneRegistry (Config config)
public ZoneRegistry (
Config config, InvocationManager invmgr, SceneRegistry screg)
{
// create a zone provider and register it with the invocation
// services
ZoneProvider provider = new ZoneProvider(this, screg);
invmgr.registerProvider(ZoneProvider.MODULE_NAME, provider);
}
/**