com.threerings.crowd.server
Class BodyLocator

java.lang.Object
  extended by com.threerings.crowd.server.BodyLocator

public class BodyLocator
extends Object

Used to lookup BodyObject instances by name.


Field Summary
protected  ClientManager _clmgr
           
 
Constructor Summary
BodyLocator()
           
 
Method Summary
 BodyObject forClient(ClientObject client)
          Returns the body object to be used for the given client.
 BodyObject lookupBody(Name visibleName)
          Returns the body object for the user with the specified visible name, or null if they are not online.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_clmgr

@Inject
protected ClientManager _clmgr
Constructor Detail

BodyLocator

public BodyLocator()
Method Detail

lookupBody

public BodyObject lookupBody(Name visibleName)
Returns the body object for the user with the specified visible name, or null if they are not online.


forClient

public BodyObject forClient(ClientObject client)
Returns the body object to be used for the given client. This is the reverse operation of BodyObject.getClientObject() and the two should match. The default implementation assumes they are one and the same. This method should return null if the client is not currently controlling a body.