Moved location services implementation into LocationManager so that
LocationProvider can be an interface like its brothers and sisters. Modified the place registry to create PlaceManager instances using the injector so that we can inject dependencies into managers. Also modified the custom classloader functionality so that it can/will circumvent this process entirely. It's not possible to inject using a custom classloader and one certainly would not want to do so. Unfortunately this means we can't inject some basic managers into PlaceManager because it needs to work for games loaded into a sandboxed classloader, but the big win is that in everything other than GameManager and PlaceManager, we can inject to our heart's content. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5168 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -30,10 +30,11 @@ import com.google.inject.Inject;
|
||||
import com.google.inject.Injector;
|
||||
import com.google.inject.Singleton;
|
||||
|
||||
import com.threerings.bureau.data.AgentObject;
|
||||
|
||||
import com.threerings.presents.dobj.RootDObjectManager;
|
||||
import com.threerings.presents.server.ShutdownManager;
|
||||
|
||||
import com.threerings.bureau.data.AgentObject;
|
||||
|
||||
import static com.threerings.bureau.Log.log;
|
||||
|
||||
/**
|
||||
@@ -173,11 +174,11 @@ public class RegistryTester
|
||||
}
|
||||
|
||||
// create or destroy some agents
|
||||
TestServer.omgr.postRunnable(createOrDestroyAgents);
|
||||
_omgr.postRunnable(createOrDestroyAgents);
|
||||
}
|
||||
|
||||
// clean up
|
||||
TestServer.omgr.postRunnable(new Runnable() {
|
||||
_omgr.postRunnable(new Runnable() {
|
||||
public void run () {
|
||||
for (AgentObject obj : _agents) {
|
||||
TestServer.breg.destroyAgent(obj);
|
||||
@@ -217,6 +218,8 @@ public class RegistryTester
|
||||
return obj;
|
||||
}
|
||||
|
||||
@Inject protected RootDObjectManager _omgr;
|
||||
|
||||
protected TestServer _server;
|
||||
protected boolean _stop;
|
||||
protected Random _rng1;
|
||||
|
||||
Reference in New Issue
Block a user