Use the new ClientFactory.

git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@7 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Michael Bayne
2006-07-01 03:41:41 +00:00
parent 458a187145
commit 65681f36f0
2 changed files with 31 additions and 2 deletions
@@ -21,7 +21,15 @@
package com.threerings.micasa.server; package com.threerings.micasa.server;
import com.threerings.util.Name;
import com.threerings.presents.net.AuthRequest;
import com.threerings.presents.server.ClientFactory;
import com.threerings.presents.server.ClientResolver;
import com.threerings.presents.server.PresentsClient;
import com.threerings.crowd.server.CrowdServer; import com.threerings.crowd.server.CrowdServer;
import com.threerings.parlor.server.ParlorManager; import com.threerings.parlor.server.ParlorManager;
import com.threerings.micasa.Log; import com.threerings.micasa.Log;
@@ -49,7 +57,14 @@ public class MiCasaServer extends CrowdServer
super.init(); super.init();
// configure the client manager to use our client class // configure the client manager to use our client class
clmgr.setClientClass(MiCasaClient.class); clmgr.setClientFactory(new ClientFactory() {
public PresentsClient createClient (AuthRequest areq) {
return new MiCasaClient();
}
public ClientResolver createClientResolver (Name username) {
return new ClientResolver();
}
});
// initialize our parlor manager // initialize our parlor manager
parmgr.init(invmgr, plreg); parmgr.init(invmgr, plreg);
@@ -21,6 +21,13 @@
package com.threerings.whirled.server; package com.threerings.whirled.server;
import com.threerings.util.Name;
import com.threerings.presents.net.AuthRequest;
import com.threerings.presents.server.ClientFactory;
import com.threerings.presents.server.ClientResolver;
import com.threerings.presents.server.PresentsClient;
import com.threerings.crowd.server.CrowdServer; import com.threerings.crowd.server.CrowdServer;
import com.threerings.whirled.Log; import com.threerings.whirled.Log;
@@ -46,7 +53,14 @@ public abstract class WhirledServer extends CrowdServer
super.init(); super.init();
// configure the client to use our whirled client // configure the client to use our whirled client
clmgr.setClientClass(WhirledClient.class); clmgr.setClientFactory(new ClientFactory() {
public PresentsClient createClient (AuthRequest areq) {
return new WhirledClient();
}
public ClientResolver createClientResolver (Name username) {
return new ClientResolver();
}
});
// create the scene repository // create the scene repository
_screp = createSceneRepository(); _screp = createSceneRepository();