Add a method to make a named peer's node object available.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6732 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -688,6 +688,19 @@ public abstract class PeerManager
|
||||
peer.getDObjectManager().unsubscribeFromObject(addr.oid, bits.left);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the NodeObject of the named peer, or <code>null</code> if null if the peer is not
|
||||
* currently connected to this server.
|
||||
*/
|
||||
public NodeObject getPeerNodeObject (String nodeName)
|
||||
{
|
||||
if (_nodeName.equals(nodeName)) {
|
||||
return _nodeobj;
|
||||
}
|
||||
PeerNode peer = _peers.get(nodeName);
|
||||
return (peer == null) ? null : peer.nodeobj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the client object representing the connection to the named peer, or
|
||||
* <code>null</code> if we are not currently connected to it.
|
||||
|
||||
Reference in New Issue
Block a user