Allow clients other than peer clients to be ignored.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4977 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -752,8 +752,7 @@ public class PeerManager
|
||||
// from interface ClientManager.ClientObserver
|
||||
public void clientSessionDidStart (PresentsClient client)
|
||||
{
|
||||
// if this is another peer, don't publish their info
|
||||
if (client instanceof PeerClient) {
|
||||
if (ignoreClient(client)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -775,8 +774,7 @@ public class PeerManager
|
||||
// from interface ClientManager.ClientObserver
|
||||
public void clientSessionDidEnd (PresentsClient client)
|
||||
{
|
||||
// if this is another peer, don't worry about it
|
||||
if (client instanceof PeerClient) {
|
||||
if (ignoreClient(client)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -853,6 +851,18 @@ public class PeerManager
|
||||
peer.refresh(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if we should ignore the supplied client, false if we should let our other peers
|
||||
* know that this client is authenticated with this server. <em>Note:</em> this is called at
|
||||
* the beginning and end of the client session, so this method should return the same value
|
||||
* both times.
|
||||
*/
|
||||
protected boolean ignoreClient (PresentsClient client)
|
||||
{
|
||||
// if this is another peer, don't publish their info
|
||||
return (client instanceof PeerClient);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the appropriate derived class of {@link NodeObject} which will be registered with
|
||||
* the distributed object system.
|
||||
|
||||
Reference in New Issue
Block a user