Name changes; comment fix.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1295 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2002-04-26 02:34:11 +00:00
parent e3fafb5b8c
commit 52790799d2
@@ -1,5 +1,5 @@
// //
// $Id: ClientManager.java,v 1.18 2002/04/26 02:32:27 mdb Exp $ // $Id: ClientManager.java,v 1.19 2002/04/26 02:34:11 mdb Exp $
package com.threerings.presents.server; package com.threerings.presents.server;
@@ -171,7 +171,7 @@ public class ClientManager implements ConnectionObserver
public synchronized void unmapClientObject (String username) public synchronized void unmapClientObject (String username)
{ {
// we only remove the mapping if there's not a session in progress // we only remove the mapping if there's not a session in progress
// (which is indicated by a mapping in the usermap table) // (which is indicated by an entry in the locks table)
if (!_locks.contains(username)) { if (!_locks.contains(username)) {
ClientObject clobj = (ClientObject)_objmap.remove(username); ClientObject clobj = (ClientObject)_objmap.remove(username);
PresentsServer.omgr.destroyObject(clobj.getOid()); PresentsServer.omgr.destroyObject(clobj.getOid());
@@ -185,11 +185,11 @@ public class ClientManager implements ConnectionObserver
* automatically when a real user starts a session by establishing a * automatically when a real user starts a session by establishing a
* network connection with the server. If a client session is managed * network connection with the server. If a client session is managed
* via some other mechanism (bots managed by the server, for example), * via some other mechanism (bots managed by the server, for example),
* this method and its corresponding {@link #releaseClientObject} * this method and its corresponding {@link #releaseClient} should be
* should be called at the beginning and end of the faked client * called at the beginning and end of the faked client session
* session respectively. * respectively.
*/ */
public synchronized void lockClientObject (String username) public synchronized void lockClient (String username)
{ {
if (_locks.contains(username)) { if (_locks.contains(username)) {
Log.warning("Requested to lock already locked user " + Log.warning("Requested to lock already locked user " +
@@ -204,9 +204,9 @@ public class ClientManager implements ConnectionObserver
/** /**
* Releases a client object when their session has ended. * Releases a client object when their session has ended.
* *
* @see #lockClientObject * @see #lockClient
*/ */
public synchronized void releaseClientObject (String username) public synchronized void releaseClient (String username)
{ {
if (!_locks.remove(username)) { if (!_locks.remove(username)) {
Log.warning("Requested to unlock a user that was not locked " + Log.warning("Requested to unlock a user that was not locked " +
@@ -240,7 +240,7 @@ public class ClientManager implements ConnectionObserver
client.startSession(this, username, conn); client.startSession(this, username, conn);
// lock this client for the duration of this session // lock this client for the duration of this session
lockClientObject(username); lockClient(username);
// map their client instance // map their client instance
_usermap.put(username, client); _usermap.put(username, client);
@@ -303,7 +303,7 @@ public class ClientManager implements ConnectionObserver
// remove the client from the username map // remove the client from the username map
PresentsClient rc = (PresentsClient)_usermap.remove(username); PresentsClient rc = (PresentsClient)_usermap.remove(username);
// release the client session // release the client session
releaseClientObject(username); releaseClient(username);
// and unmap (and destroy) their client object // and unmap (and destroy) their client object
unmapClientObject(username); unmapClientObject(username);