diff --git a/src/java/com/threerings/bureau/server/BureauClientFactory.java b/src/java/com/threerings/bureau/server/BureauClientFactory.java index 3d60811bf..552b8af1f 100644 --- a/src/java/com/threerings/bureau/server/BureauClientFactory.java +++ b/src/java/com/threerings/bureau/server/BureauClientFactory.java @@ -32,7 +32,9 @@ import com.threerings.bureau.data.BureauCredentials; /** * Handles resolution of bureaus and passes non-bureau resolution requests through to a normal - * factory. + * factory. For bureaus, creates base class instances {@link PresentsClient} and + * {@link ClientObject}. + * @see BureauRegistry#setDefaultClientFactory() */ public class BureauClientFactory implements ClientFactory { diff --git a/src/java/com/threerings/bureau/server/BureauRegistry.java b/src/java/com/threerings/bureau/server/BureauRegistry.java index ea4a61db9..31f49cb72 100644 --- a/src/java/com/threerings/bureau/server/BureauRegistry.java +++ b/src/java/com/threerings/bureau/server/BureauRegistry.java @@ -117,6 +117,7 @@ public class BureauRegistry * Provides the Bureau registry with necessary runtime configuration. Inserts the bureau * client factory into the client manager and registers observers to track the progress * of launched bureaus. + * @see BureauClientFactory */ public void init () { @@ -134,13 +135,17 @@ public class BureauRegistry } } }); + } + /** + * Adds the delegating client factory. Note this should be called after all application + * client factories are in place. The installed factory will simply create presents clients and + * client objects for bureaus. + */ + public void setDefaultClientFactory () + { // add the client factory, but later, after all the other modules have been initialized - _omgr.postRunnable(new Runnable() { - public void run () { - _clmgr.setClientFactory(new BureauClientFactory(_clmgr.getClientFactory())); - } - }); + _clmgr.setClientFactory(new BureauClientFactory(_clmgr.getClientFactory())); } /** diff --git a/tests/src/java/com/threerings/bureau/server/TestServer.java b/tests/src/java/com/threerings/bureau/server/TestServer.java index c0c61704d..b9a4e2328 100644 --- a/tests/src/java/com/threerings/bureau/server/TestServer.java +++ b/tests/src/java/com/threerings/bureau/server/TestServer.java @@ -74,6 +74,7 @@ public class TestServer extends PresentsServer { super.init(injector); _bureauReg.init(); + _bureauReg.setDefaultClientFactory(); } public void setClientTarget (String target)