Methods Summary |
---|
public void | addListener(PeerListener listener)Add peer listener.
|
public void | addListener(PeerListener2 listener)Add peer listener.
|
public boolean | addRequest(PeerReadRequest request)
|
public void | cancelRequest(PeerReadRequest request)
|
public void | close(java.lang.String reason, boolean closedOnError, boolean attemptReconnect)
|
public boolean[] | getAvailable()
|
public java.lang.String | getClient()
|
public org.gudy.azureus2.plugins.network.Connection | getConnection()Get the network connection that backs this peer.
|
public java.util.List | getExpiredRequests()
|
public byte[] | getHandshakeReservedBytes()
|
public byte[] | getId()
|
public java.lang.String | getIp()Get the peer's local TCP connection port.
|
public PeerManager | getManager()
|
public int | getMaximumNumberOfRequests()
|
public int | getNumberOfRequests()
|
public int | getPercentDone()
|
public int | getPercentDoneInThousandNotation()
|
public int | getPercentDoneOfCurrentIncomingRequest()
|
public int | getPercentDoneOfCurrentOutgoingRequest()
|
public int | getPort()
|
public int[] | getPriorityOffsets()
|
public java.util.Map | getProperties()Get a set of properties associated with the peer
|
public java.util.List | getRequests()
|
public long | getSnubbedTime()
|
public int | getState()
|
public PeerStats | getStats()
|
public org.gudy.azureus2.plugins.messaging.Message[] | getSupportedMessages()Get the list of messages that this peer and us mutually understand.
|
public int | getTCPListenPort()Get the TCP port this peer is listening for incoming connections on.
|
public int | getUDPListenPort()Get the UDP port this peer is listening for incoming connections on.
|
public int | getUDPNonDataListenPort()Get the UDP port this peer is listening on for non-data connections
|
public java.lang.Object | getUserData(java.lang.Object key)
|
public boolean | isChoked()
|
public boolean | isChoking()
|
public boolean | isDownloadPossible()This is much list isTransferAvailable(), except is more comprehensive.
That is; it checks a few more factors, within the object for speed,
so that a more timely status is considered and the caller doesn't need
to try to check each thing on it's own.
|
public boolean | isIncoming()
|
public boolean | isInterested()
|
public boolean | isInteresting()
|
public boolean | isOptimisticUnchoke()
|
public boolean | isPieceAvailable(int pieceNumber)
|
public boolean | isSeed()
|
public boolean | isSnubbed()
|
public boolean | isTransferAvailable()
|
public int | readBytes(int max)Rate control - gives the maximum number of bytes that can be read from this
connection at this time and returns the actual number read
|
public void | removeListener(PeerListener listener)Remove peer listener.
|
public void | removeListener(PeerListener2 listener)Remove peer listener.
|
public void | requestAllocationComplete()
|
public boolean | requestAllocationStarts(int[] base_priorities)
|
public void | setOptimisticUnchoke(boolean is_optimistic)
|
public void | setSnubbed(boolean b)
|
public void | setUserData(java.lang.Object key, java.lang.Object value)
|
public boolean | supportsMessaging()Whether or not this peer supports the advanced messaging API.
|
public int | writeBytes(int max)
|