Added locateClient().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4771 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -222,6 +222,19 @@ public class PeerManager
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Locates the client with the specified name. Returns null if the client is not logged onto
|
||||
* any peer.
|
||||
*/
|
||||
public ClientInfo locateClient (final Name key)
|
||||
{
|
||||
return lookupNodeDatum(new Lookup<ClientInfo>() {
|
||||
public ClientInfo lookup (NodeObject nodeobj) {
|
||||
return nodeobj.clients.get(key);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Locates a datum from among the set of peer {@link NodeObject}s. Objects are searched in
|
||||
* arbitrary order and the first non-null value returned by the supplied lookup operation is
|
||||
|
||||
Reference in New Issue
Block a user