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:
@@ -21,7 +21,15 @@
|
||||
|
||||
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.parlor.server.ParlorManager;
|
||||
|
||||
import com.threerings.micasa.Log;
|
||||
@@ -49,7 +57,14 @@ public class MiCasaServer extends CrowdServer
|
||||
super.init();
|
||||
|
||||
// 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
|
||||
parmgr.init(invmgr, plreg);
|
||||
|
||||
@@ -21,6 +21,13 @@
|
||||
|
||||
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.whirled.Log;
|
||||
@@ -46,7 +53,14 @@ public abstract class WhirledServer extends CrowdServer
|
||||
super.init();
|
||||
|
||||
// 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
|
||||
_screp = createSceneRepository();
|
||||
|
||||
Reference in New Issue
Block a user