sg.edu.nus.peer.management
Class OnlinePeerManager

java.lang.Object
  extended by sg.edu.nus.peer.management.OnlinePeerManager

Deprecated.

public class OnlinePeerManager
extends java.lang.Object

Manage all online peers, including remove offline peers and add online peers.

Version:
1.0 2006-1-14
Author:
Xu Linhao

Method Summary
 void add(PeerInfo p)
          Deprecated.  
 java.util.Vector<PeerInfo> getCommonPeers()
          Deprecated.  
static OnlinePeerManager getInstance()
          Deprecated. Implement a singleton object.
 java.util.Vector<PeerInfo> getSuperPeers()
          Deprecated.  
 boolean hasCommonPeers()
          Deprecated.  
 boolean hasSuperPeers()
          Deprecated.  
 int indexOf(PeerInfo p)
          Deprecated.  
 void remove(int idx, PeerInfo p)
          Deprecated.  
 void remove(PeerInfo p)
          Deprecated.  
 void removeAll()
          Deprecated.  
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static OnlinePeerManager getInstance()
Deprecated. 
Implement a singleton object.

Returns:
the instance of the OnlinePeerMgr

add

public void add(PeerInfo p)
Deprecated. 

Add a peer.

Parameters:
p - a peer's information

indexOf

public int indexOf(PeerInfo p)
Deprecated. 

Remove a peer

Parameters:
p - a peer's information

remove

public void remove(PeerInfo p)
Deprecated. 

Parameters:
p -

remove

public void remove(int idx,
                   PeerInfo p)
Deprecated. 

Parameters:
idx -
p -

removeAll

public void removeAll()
Deprecated. 


hasSuperPeers

public boolean hasSuperPeers()
Deprecated. 

Judge whether exist online super peers.

Returns:
if have not, return true; otherwise, return false

getSuperPeers

public java.util.Vector<PeerInfo> getSuperPeers()
Deprecated. 

Return all super peers.

Returns:
all super peers

hasCommonPeers

public boolean hasCommonPeers()
Deprecated. 

Judge whether exist online common peers.

Returns:
if have not, return true; otherwise, return false

getCommonPeers

public java.util.Vector<PeerInfo> getCommonPeers()
Deprecated. 

Return all common peers.

Returns:
all common peers