Actually we need to set up our local attribute here.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5476 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2008-10-28 20:02:51 +00:00
parent b9ab203c0c
commit 6fd2882fa9
5 changed files with 16 additions and 16 deletions
@@ -23,7 +23,6 @@ package com.threerings.crowd.server;
import com.google.inject.Inject;
import com.threerings.presents.server.ClientLocal;
import com.threerings.presents.server.PresentsClient;
import com.threerings.crowd.chat.server.SpeakUtil;
@@ -35,12 +34,6 @@ import com.threerings.crowd.data.OccupantInfo;
*/
public class CrowdClient extends PresentsClient
{
@Override
protected ClientLocal createLocalAttribute ()
{
return new BodyLocal();
}
@Override
protected void sessionConnectionClosed ()
{
@@ -23,6 +23,7 @@ package com.threerings.crowd.server;
import com.threerings.presents.data.ClientObject;
import com.threerings.presents.data.PermissionPolicy;
import com.threerings.presents.server.ClientLocal;
import com.threerings.presents.server.ClientResolver;
import com.threerings.crowd.data.BodyObject;
@@ -39,6 +40,12 @@ public class CrowdClientResolver extends ClientResolver
return new BodyObject();
}
@Override
public ClientLocal createLocalAttribute ()
{
return new BodyLocal();
}
@Override // from ClientResolver
public PermissionPolicy createPermissionPolicy ()
{
@@ -288,6 +288,7 @@ public class ClientManager
_omgr.postRunnable(new Runnable() {
public void run () {
ClientObject clobj = fclr.createClientObject();
clobj.setLocal(ClientLocal.class, fclr.createLocalAttribute());
clobj.setPermissionPolicy(fclr.createPermissionPolicy());
fclr.objectAvailable(_omgr.registerObject(clobj));
}
@@ -72,6 +72,14 @@ public class ClientResolver extends Invoker.Unit
return new ClientObject();
}
/**
* Creates a record that will be maintained only on the server to track client related bits.
*/
public ClientLocal createLocalAttribute ()
{
return new ClientLocal();
}
/**
* Creates a permission policy for use by our client.
*/
@@ -367,7 +367,6 @@ public class PresentsClient
{
// we'll be keeping this bad boy
_clobj = clobj;
_clobj.setLocal(ClientLocal.class, createLocalAttribute());
// if our connection was closed while we were resolving our client object, then just
// abandon ship
@@ -424,14 +423,6 @@ public class PresentsClient
disp.dispatch(this, message);
}
/**
* Creates a record that will be maintained only on the server to track client related bits.
*/
protected ClientLocal createLocalAttribute ()
{
return new ClientLocal();
}
/**
* Called when {@link #setUsername} has been called and the new client object is about to be
* applied to this client. The old client object will not yet have been destroyed, so any final