org.gudy.azureus2.plugins.peers
Interface PeerManager

All Known Implementing Classes:
PeerManagerImpl

public interface PeerManager

Author:
parg

Method Summary
 void addListener(PeerManagerListener l)
           
 void addListener(PeerManagerListener2 l)
           
 void addPeer(Peer peer)
           
 void addPeer(String ip_address, int port)
          Add a new peer, using the default internal Peer implementation (like for peers given in announce reply), using the given address and port.
 void addPeer(String ip_address, int tcp_port, boolean use_crypto)
           
 void addPeer(String ip_address, int tcp_port, int udp_port, boolean use_crypto)
           
 void addPeer(String ip_address, int tcp_port, int udp_port, boolean use_crypto, Map<Object,Object> user_data)
           
 PeerStats createPeerStats(Peer peer)
           
 DiskManager getDiskManager()
           
 Download getDownload()
           
 int getDownloadRateLimitBytesPerSecond()
           
 Peer[] getPeers()
           
 Peer[] getPeers(String address)
          returns the peers for the given address
 PeerDescriptor[] getPendingPeers()
          Get the list of currently pending peers
 PeerDescriptor[] getPendingPeers(String address)
          returns the pending connections to the given address
 Piece[] getPieces()
           
 PeerManagerStats getStats()
           
 int getUploadRateLimitBytesPerSecond()
           
 boolean isSeeding()
           
 boolean isSuperSeeding()
           
 void peerDiscovered(String peer_source, String ip_address, int tcp_port, int udp_port, boolean use_crypto)
           
 void removeListener(PeerManagerListener l)
           
 void removeListener(PeerManagerListener2 l)
           
 void removePeer(Peer peer)
           
 void requestCancelled(PeerReadRequest request, Peer sender)
           
 void requestComplete(PeerReadRequest request, PooledByteBuffer data, Peer sender)
           
 

Method Detail

getDownload

Download getDownload()
                     throws DownloadException
Throws:
DownloadException

addPeer

void addPeer(Peer peer)

addPeer

void addPeer(String ip_address,
             int port)
Add a new peer, using the default internal Peer implementation (like for peers given in announce reply), using the given address and port.

Parameters:
ip_address - of peer to inject
port - of peer to inject

addPeer

void addPeer(String ip_address,
             int tcp_port,
             boolean use_crypto)

addPeer

void addPeer(String ip_address,
             int tcp_port,
             int udp_port,
             boolean use_crypto)

addPeer

void addPeer(String ip_address,
             int tcp_port,
             int udp_port,
             boolean use_crypto,
             Map<Object,Object> user_data)

peerDiscovered

void peerDiscovered(String peer_source,
                    String ip_address,
                    int tcp_port,
                    int udp_port,
                    boolean use_crypto)

removePeer

void removePeer(Peer peer)

getPeers

Peer[] getPeers()

getPeers

Peer[] getPeers(String address)
returns the peers for the given address

Parameters:
address -
Returns:

getPendingPeers

PeerDescriptor[] getPendingPeers()
Get the list of currently pending peers

Returns:
Since:
4005

getPendingPeers

PeerDescriptor[] getPendingPeers(String address)
returns the pending connections to the given address

Parameters:
address -
Returns:

getDiskManager

DiskManager getDiskManager()

getStats

PeerManagerStats getStats()

isSeeding

boolean isSeeding()

isSuperSeeding

boolean isSuperSeeding()

createPeerStats

PeerStats createPeerStats(Peer peer)

requestComplete

void requestComplete(PeerReadRequest request,
                     PooledByteBuffer data,
                     Peer sender)

requestCancelled

void requestCancelled(PeerReadRequest request,
                      Peer sender)

getPieces

Piece[] getPieces()

getUploadRateLimitBytesPerSecond

int getUploadRateLimitBytesPerSecond()

getDownloadRateLimitBytesPerSecond

int getDownloadRateLimitBytesPerSecond()

addListener

void addListener(PeerManagerListener l)

removeListener

void removeListener(PeerManagerListener l)

addListener

void addListener(PeerManagerListener2 l)

removeListener

void removeListener(PeerManagerListener2 l)