We can just inject the injector.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5653 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2009-02-13 02:51:34 +00:00
parent c5b7379dea
commit 9a4f2edc5d
2 changed files with 3 additions and 16 deletions
@@ -71,9 +71,6 @@ public class CrowdServer extends PresentsServer
return CrowdClientResolver.class;
}
});
// configure the place registry with the injector
_plreg.setInjector(injector);
}
public static void main (String[] args)
@@ -65,16 +65,6 @@ public class PlaceRegistry
shutmgr.registerShutdowner(this);
}
/**
* Provides the place registry with access to an injector that it can use to create {@link
* PlaceManager} instances with all dependencies resolved. This is called by the {@link
* CrowdServer} during the server initialization phase.
*/
public void setInjector (Injector injector)
{
_injector = injector;
}
/**
* Returns the place manager associated with the specified place object id or null if no such
* place exists.
@@ -268,6 +258,9 @@ public class PlaceRegistry
}
}
/** We use this to inject dependencies into place managers that we create. */
@Inject protected Injector _injector;
/** The invocation manager with which we operate. */
@Inject protected InvocationManager _invmgr;
@@ -277,9 +270,6 @@ public class PlaceRegistry
/** Used to look body objects up by name. */
@Inject protected BodyLocator _locator;
/** We use this to inject dependencies into place managers that we create. */
protected Injector _injector;
/** A mapping from place object id to place manager. */
protected IntMap<PlaceManager> _pmgrs = IntMaps.newHashIntMap();
}