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:
@@ -23,7 +23,6 @@ package com.threerings.crowd.server;
|
|||||||
|
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
|
|
||||||
import com.threerings.presents.server.ClientLocal;
|
|
||||||
import com.threerings.presents.server.PresentsClient;
|
import com.threerings.presents.server.PresentsClient;
|
||||||
|
|
||||||
import com.threerings.crowd.chat.server.SpeakUtil;
|
import com.threerings.crowd.chat.server.SpeakUtil;
|
||||||
@@ -35,12 +34,6 @@ import com.threerings.crowd.data.OccupantInfo;
|
|||||||
*/
|
*/
|
||||||
public class CrowdClient extends PresentsClient
|
public class CrowdClient extends PresentsClient
|
||||||
{
|
{
|
||||||
@Override
|
|
||||||
protected ClientLocal createLocalAttribute ()
|
|
||||||
{
|
|
||||||
return new BodyLocal();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void sessionConnectionClosed ()
|
protected void sessionConnectionClosed ()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ package com.threerings.crowd.server;
|
|||||||
|
|
||||||
import com.threerings.presents.data.ClientObject;
|
import com.threerings.presents.data.ClientObject;
|
||||||
import com.threerings.presents.data.PermissionPolicy;
|
import com.threerings.presents.data.PermissionPolicy;
|
||||||
|
import com.threerings.presents.server.ClientLocal;
|
||||||
import com.threerings.presents.server.ClientResolver;
|
import com.threerings.presents.server.ClientResolver;
|
||||||
|
|
||||||
import com.threerings.crowd.data.BodyObject;
|
import com.threerings.crowd.data.BodyObject;
|
||||||
@@ -39,6 +40,12 @@ public class CrowdClientResolver extends ClientResolver
|
|||||||
return new BodyObject();
|
return new BodyObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ClientLocal createLocalAttribute ()
|
||||||
|
{
|
||||||
|
return new BodyLocal();
|
||||||
|
}
|
||||||
|
|
||||||
@Override // from ClientResolver
|
@Override // from ClientResolver
|
||||||
public PermissionPolicy createPermissionPolicy ()
|
public PermissionPolicy createPermissionPolicy ()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -288,6 +288,7 @@ public class ClientManager
|
|||||||
_omgr.postRunnable(new Runnable() {
|
_omgr.postRunnable(new Runnable() {
|
||||||
public void run () {
|
public void run () {
|
||||||
ClientObject clobj = fclr.createClientObject();
|
ClientObject clobj = fclr.createClientObject();
|
||||||
|
clobj.setLocal(ClientLocal.class, fclr.createLocalAttribute());
|
||||||
clobj.setPermissionPolicy(fclr.createPermissionPolicy());
|
clobj.setPermissionPolicy(fclr.createPermissionPolicy());
|
||||||
fclr.objectAvailable(_omgr.registerObject(clobj));
|
fclr.objectAvailable(_omgr.registerObject(clobj));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,6 +72,14 @@ public class ClientResolver extends Invoker.Unit
|
|||||||
return new ClientObject();
|
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.
|
* Creates a permission policy for use by our client.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -367,7 +367,6 @@ public class PresentsClient
|
|||||||
{
|
{
|
||||||
// we'll be keeping this bad boy
|
// we'll be keeping this bad boy
|
||||||
_clobj = clobj;
|
_clobj = clobj;
|
||||||
_clobj.setLocal(ClientLocal.class, createLocalAttribute());
|
|
||||||
|
|
||||||
// if our connection was closed while we were resolving our client object, then just
|
// if our connection was closed while we were resolving our client object, then just
|
||||||
// abandon ship
|
// abandon ship
|
||||||
@@ -424,14 +423,6 @@ public class PresentsClient
|
|||||||
disp.dispatch(this, message);
|
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
|
* 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
|
* applied to this client. The old client object will not yet have been destroyed, so any final
|
||||||
|
|||||||
Reference in New Issue
Block a user