Created a party client which sets up the username in the body object.
Modified the party server to configure the cher services to use our party client. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@163 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -0,0 +1,29 @@
|
|||||||
|
//
|
||||||
|
// $Id: CrowdClient.java,v 1.1 2001/08/03 02:28:20 mdb Exp $
|
||||||
|
|
||||||
|
package com.threerings.cocktail.party.server;
|
||||||
|
|
||||||
|
import com.threerings.cocktail.cher.server.CherClient;
|
||||||
|
import com.threerings.cocktail.party.data.BodyObject;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The party client extends the cher client and does some initializations
|
||||||
|
* necessary for the party services.
|
||||||
|
*/
|
||||||
|
public class PartyClient extends CherClient
|
||||||
|
{
|
||||||
|
protected void sessionWillStart ()
|
||||||
|
{
|
||||||
|
// cast our client object to a body object
|
||||||
|
_bodobj = (BodyObject)_clobj;
|
||||||
|
|
||||||
|
// and configure our username
|
||||||
|
_bodobj.setUsername(_username);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void sessionWillResume ()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected BodyObject _bodobj;
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: CrowdServer.java,v 1.3 2001/08/02 01:47:56 mdb Exp $
|
// $Id: CrowdServer.java,v 1.4 2001/08/03 02:28:20 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.cocktail.party.server;
|
package com.threerings.cocktail.party.server;
|
||||||
|
|
||||||
@@ -34,6 +34,9 @@ public class PartyServer extends CherServer
|
|||||||
// bind the party server config into the namespace
|
// bind the party server config into the namespace
|
||||||
config.bindProperties(CONFIG_KEY, CONFIG_PATH);
|
config.bindProperties(CONFIG_KEY, CONFIG_PATH);
|
||||||
|
|
||||||
|
// configure the client to use our party client
|
||||||
|
clmgr.setClientClass(PartyClient.class);
|
||||||
|
|
||||||
// configure the client to use the body object
|
// configure the client to use the body object
|
||||||
clmgr.setClientObjectClass(BodyObject.class);
|
clmgr.setClientObjectClass(BodyObject.class);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user