PresentsClient -> PresentsSession (Jamie's suggestion) and associated changes

on down the client.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5508 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2008-11-06 18:04:42 +00:00
parent a9f7175d2f
commit c69630b7e0
17 changed files with 98 additions and 101 deletions
@@ -45,8 +45,8 @@ public class CrowdObjectAccess
// documentation inherited from interface
public boolean allowSubscribe (DObject object, Subscriber<?> sub)
{
if (CrowdClient.class.isInstance(sub)) {
ClientObject co = CrowdClient.class.cast(sub).getClientObject();
if (CrowdSession.class.isInstance(sub)) {
ClientObject co = CrowdSession.class.cast(sub).getClientObject();
return ((PlaceObject)object).occupants.contains(co.getOid());
}
return true;
@@ -31,7 +31,7 @@ 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.presents.server.PresentsSession;
import com.threerings.presents.server.PresentsServer;
import com.threerings.crowd.chat.server.ChatProvider;
@@ -64,8 +64,8 @@ public class CrowdServer extends PresentsServer
// configure the client manager to use our bits
_clmgr.setClientFactory(new ClientFactory() {
public Class<? extends PresentsClient> getClientClass (AuthRequest areq) {
return CrowdClient.class;
public Class<? extends PresentsSession> getClientClass (AuthRequest areq) {
return CrowdSession.class;
}
public Class<? extends ClientResolver> getClientResolverClass (Name username) {
return CrowdClientResolver.class;
@@ -23,16 +23,16 @@ package com.threerings.crowd.server;
import com.google.inject.Inject;
import com.threerings.presents.server.PresentsClient;
import com.threerings.presents.server.PresentsSession;
import com.threerings.crowd.chat.server.SpeakUtil;
import com.threerings.crowd.data.BodyObject;
import com.threerings.crowd.data.OccupantInfo;
/**
* The crowd client extends the presents client with crowd-specific client handling.
* Extends the presents session with crowd-specific session handling.
*/
public class CrowdClient extends PresentsClient
public class CrowdSession extends PresentsSession
{
@Override
protected void sessionConnectionClosed ()
@@ -29,7 +29,7 @@ import com.threerings.presents.dobj.RootDObjectManager;
import com.threerings.presents.server.ClientManager;
import com.threerings.presents.server.InvocationException;
import com.threerings.presents.server.InvocationManager;
import com.threerings.presents.server.PresentsClient;
import com.threerings.presents.server.PresentsSession;
import com.threerings.crowd.client.LocationService;
import com.threerings.crowd.data.BodyObject;
@@ -111,7 +111,7 @@ public class LocationManager
}
// configure the client accordingly if the place uses a custom class loader
PresentsClient client = _clmgr.getClient(source.username);
PresentsSession client = _clmgr.getClient(source.username);
if (client != null) {
client.setClassLoader(pmgr.getClass().getClassLoader());
}