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:
@@ -71,9 +71,6 @@ public class CrowdServer extends PresentsServer
|
|||||||
return CrowdClientResolver.class;
|
return CrowdClientResolver.class;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// configure the place registry with the injector
|
|
||||||
_plreg.setInjector(injector);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main (String[] args)
|
public static void main (String[] args)
|
||||||
|
|||||||
@@ -65,16 +65,6 @@ public class PlaceRegistry
|
|||||||
shutmgr.registerShutdowner(this);
|
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
|
* Returns the place manager associated with the specified place object id or null if no such
|
||||||
* place exists.
|
* 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. */
|
/** The invocation manager with which we operate. */
|
||||||
@Inject protected InvocationManager _invmgr;
|
@Inject protected InvocationManager _invmgr;
|
||||||
|
|
||||||
@@ -277,9 +270,6 @@ public class PlaceRegistry
|
|||||||
/** Used to look body objects up by name. */
|
/** Used to look body objects up by name. */
|
||||||
@Inject protected BodyLocator _locator;
|
@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. */
|
/** A mapping from place object id to place manager. */
|
||||||
protected IntMap<PlaceManager> _pmgrs = IntMaps.newHashIntMap();
|
protected IntMap<PlaceManager> _pmgrs = IntMaps.newHashIntMap();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user