Doris the refactorasaurus. Restructured the whole client object resolution
process so that it can be done by other entities than just the client management services. Coordination between these parties is managed so that no toes are stepped on in the course of loading and unloading clients and everything is generally much nicer. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1086 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,45 +1,16 @@
|
||||
//
|
||||
// $Id: CrowdClient.java,v 1.7 2002/02/20 23:35:42 mdb Exp $
|
||||
// $Id: CrowdClient.java,v 1.8 2002/03/05 05:33:25 mdb Exp $
|
||||
|
||||
package com.threerings.crowd.server;
|
||||
|
||||
import com.threerings.presents.server.PresentsClient;
|
||||
import com.threerings.crowd.data.BodyObject;
|
||||
|
||||
/**
|
||||
* The crowd client extends the presents client and does some
|
||||
* initializations necessary for the crowd services.
|
||||
* The crowd client extends the presents client but doesn't really do
|
||||
* anything at present. It exists mainly so that implementation systems
|
||||
* will extend it and ensure that we have the option of adding
|
||||
* functionality here in the future.
|
||||
*/
|
||||
public class CrowdClient extends PresentsClient
|
||||
{
|
||||
protected void sessionWillStart (Object authInfo)
|
||||
{
|
||||
super.sessionWillStart(authInfo);
|
||||
|
||||
// cast our client object to a body object
|
||||
_bodobj = (BodyObject)_clobj;
|
||||
|
||||
// and configure our username
|
||||
_bodobj.setUsername(_username);
|
||||
|
||||
// register our body object mapping
|
||||
CrowdServer.mapBody(_username, _bodobj);
|
||||
}
|
||||
|
||||
protected void sessionWillResume (Object authInfo)
|
||||
{
|
||||
super.sessionWillResume(authInfo);
|
||||
|
||||
// nothing to do here presently
|
||||
}
|
||||
|
||||
protected void sessionDidTerminate ()
|
||||
{
|
||||
super.sessionDidTerminate();
|
||||
|
||||
// unregister our body object mapping
|
||||
CrowdServer.unmapBody(_username);
|
||||
}
|
||||
|
||||
protected BodyObject _bodobj;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user