|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gudy.azureus2.core3.logging.LogRelation
org.gudy.azureus2.core3.peer.impl.transport.PEPeerTransportProtocol
public class PEPeerTransportProtocol
Nested Class Summary | |
---|---|
protected static class |
PEPeerTransportProtocol.MutableInteger
|
Field Summary | |
---|---|
protected boolean |
choking_other_peer
|
protected boolean |
closing
|
protected int |
connection_state
|
protected DiskManager |
diskManager
|
protected static boolean |
ENABLE_LAZY_BITFIELD
|
protected java.lang.String |
ip_resolved
|
protected static LogIDs |
LOGID
|
protected PEPeerControl |
manager
|
protected PeerMessageLimiter |
message_limiter
|
protected int |
nbPieces
|
protected PEPeerStats |
peer_stats
|
protected PiecePicker |
piecePicker
|
Fields inherited from interface org.gudy.azureus2.core3.peer.impl.PEPeerTransport |
---|
CONNECTION_CONNECTING, CONNECTION_FULLY_ESTABLISHED, CONNECTION_PENDING, CONNECTION_WAITING_FOR_HANDSHAKE |
Fields inherited from interface org.gudy.azureus2.core3.peer.PEPeer |
---|
CLOSING, CONNECTING, DISCONNECTED, HANDSHAKING, MESSAGING_AZMP, MESSAGING_BT_ONLY, MESSAGING_EXTERN, MESSAGING_LTEP, StateNames, TRANSFERING |
Fields inherited from interface com.aelitis.azureus.core.tag.Taggable |
---|
TT_DOWNLOAD, TT_PEER |
Constructor Summary | |
---|---|
PEPeerTransportProtocol(PEPeerControl _manager,
java.lang.String _peer_source,
NetworkConnection _connection,
java.util.Map _initial_user_data)
|
|
PEPeerTransportProtocol(PEPeerControl _manager,
java.lang.String _peer_source,
java.lang.String _ip,
int _tcp_port,
int _udp_port,
boolean _use_tcp,
boolean _require_crypto_handshake,
byte _crypto_level,
java.util.Map _initial_user_data)
|
Method Summary | |
---|---|
void |
addListener(PEPeerListener listener)
Add peer listener. |
void |
addRateLimiter(LimitedRateGroup limiter,
boolean upload)
|
void |
addReservedPieceNumber(int piece_number)
adds the reserved piece for piece picking by this peer |
protected void |
calculatePiecePriorities()
|
protected void |
checkFast(BitFlags flags)
|
void |
checkInterested()
Global checkInterested method. |
void |
clearRequestHint()
|
void |
closeConnection(java.lang.String reason)
Close the peer connection from the PEPeerControl manager side. |
protected void |
closeConnectionInternally(java.lang.String reason)
|
protected void |
closeConnectionInternally(java.lang.String reason,
boolean connect_failed,
boolean network_failure)
Close the peer connection from within the PEPeerTransport object. |
protected void |
decodeAZBadPiece(AZBadPiece bad_piece)
|
protected void |
decodeAZHandshake(AZHandshake handshake)
|
protected void |
decodeAZHave(AZHave have)
|
protected void |
decodeAZRequestHint(AZRequestHint hint)
|
protected void |
decodeAZStatsReply(AZStatReply reply)
|
protected void |
decodeAZStatsRequest(AZStatRequest request)
|
protected void |
decodeBitfield(BTBitfield bitfield)
|
protected void |
decodeBTHandshake(BTHandshake handshake)
|
protected void |
decodeCancel(BTCancel cancel)
|
protected void |
decodeChoke(BTChoke choke)
|
protected void |
decodeHave(BTHave have)
|
protected void |
decodeHaveAll(BTHaveAll have_all)
|
protected void |
decodeHaveNone(BTHaveNone have_none)
|
protected void |
decodeInterested(BTInterested interested)
|
protected void |
decodeLTHandshake(LTHandshake handshake)
|
protected void |
decodeMainlineDHTPort(BTDHTPort port)
|
protected void |
decodeMetaData(AZUTMetaData metadata)
|
protected void |
decodePeerExchange(AZStylePeerExchange exchange)
|
protected void |
decodePiece(BTPiece piece)
|
protected void |
decodeRejectRequest(BTRejectRequest reject)
|
protected void |
decodeRequest(BTRequest request)
|
protected void |
decodeSuggestPiece(BTSuggestPiece hint)
|
protected void |
decodeUnchoke(BTUnchoke unchoke)
|
protected void |
decodeUninterested(BTUninterested uninterested)
|
protected void |
decodeUploadOnly(UTUploadOnly message)
|
void |
doKeepAliveCheck()
Check if we need to send a keep-alive message. |
void |
doPerformanceTuningCheck()
Perform checks related to performance optimizations, i.e. |
boolean |
doTimeoutChecks()
Check for possible connection timeouts. |
void |
generateEvidence(IndentWriter writer)
|
protected java.util.List<java.lang.Integer> |
generateFastSet(byte[] hash,
java.lang.String ip,
int num_pieces,
int num_required)
|
protected java.util.List<java.lang.Integer> |
generateFastSet(int num)
|
java.net.InetAddress |
getAlternativeIPv6()
|
BitFlags |
getAvailable()
|
protected long |
getBytesDownloaded()
|
long |
getBytesRemaining()
|
java.lang.String |
getClient()
|
java.lang.String |
getClientNameFromExtensionHandshake()
|
java.lang.String |
getClientNameFromPeerID()
|
int |
getConnectionState()
Get the specific peer connection state. |
int |
getConsecutiveNoRequestCount()
|
PEPeerControl |
getControl()
|
java.lang.Object |
getData(java.lang.String key)
To retreive arbitrary objects against a peer. |
int |
getDownloadRateLimitBytesPerSecond()
|
java.lang.String |
getEncryption()
Returns name of encryption used by the peer |
java.util.List |
getExpiredRequests()
|
byte[] |
getHandshakeReservedBytes()
|
byte[] |
getId()
|
int |
getIncomingRequestCount()
|
int[] |
getIncomingRequestedPieceNumbers()
get a list of piece numbers the peer has requested |
java.lang.String |
getIp()
|
java.lang.String |
getIPHostName()
Gets the host name for the IP, if possible, IP as string otherwise |
long |
getLastMessageSentTime()
|
int |
getLastPiece()
|
long |
getLatency()
|
PEPeerManager |
getManager()
|
int |
getMaxNbRequests()
peer-specific request max. |
int |
getMessagingMode()
|
int |
getNbRequests()
|
java.lang.String |
getNetwork()
|
int |
getOutboundDataQueueSize()
amount of data queued for delivery to peer |
int |
getOutgoingRequestCount()
|
int[] |
getOutgoingRequestedPieceNumbers()
get a list of piece numbers the we have requested from peer |
PeerItem |
getPeerItemIdentity()
Get the peer's address + port identification item. |
java.lang.String |
getPeerSource()
|
int |
getPeerState()
|
int |
getPercentDoneInThousandNotation()
Get the peer's torrent completion percentage in thousand-notation, i.e. |
int |
getPercentDoneOfCurrentIncomingRequest()
|
int |
getPercentDoneOfCurrentOutgoingRequest()
|
Connection |
getPluginConnection()
Get the connection that backs this peer. |
int |
getPort()
Get the peer's local TCP connection port. |
int[] |
getPriorityOffsets()
Any priority offsets this peer has, or null if none |
java.lang.String |
getProtocol()
|
java.lang.String |
getProtocolQualifier()
|
java.lang.Object[] |
getQueryableInterfaces()
Query this class for a reference to another class that it may hold |
LimitedRateGroup[] |
getRateLimiters(boolean upload)
|
java.lang.String |
getRelationText()
A short description of what your class holds that can be printed by the logger |
int[] |
getRequestHint()
Get current request hint for a given piece for this peer. |
int |
getRequestIndex(DiskManagerReadRequest request)
Returns the index of this request in the peer's queue or -1 if not found |
int[] |
getReservedPieceNumbers()
Get the reserved pieces for piece picking by this peer |
long |
getSnubbedTime()
|
PEPeerStats |
getStats()
|
java.lang.String |
getString()
|
Message[] |
getSupportedMessages()
Get the list of messages that this peer and us both understand. |
java.lang.String |
getTaggableID()
|
TaggableResolver |
getTaggableResolver()
|
java.lang.Object |
getTaggableTransientProperty(java.lang.String key)
|
int |
getTaggableType()
|
int |
getTCPListenPort()
Get the TCP port this peer is listening for incoming connections on. |
long |
getTimeSinceConnectionEstablished()
Get the time since this connection was first established. |
long |
getTimeSinceGoodDataReceived()
Get the time since the most-recent data that was actually written to disk was received. |
long |
getTimeSinceLastDataMessageReceived()
Get the time since the last (most-recent) data (payload) message was received. |
long |
getTimeSinceLastDataMessageSent()
Get the time since the last (most-recent) data (payload) message was sent. |
int |
getUDPListenPort()
Get the UDP port this peer is listening for incoming connections on. |
int |
getUDPNonDataListenPort()
Get the UDP port this peer is listening on for non-data connections |
long |
getUnchokedForMillis()
|
int |
getUniqueAnnounce()
|
int |
getUploadHint()
|
int |
getUploadRateLimitBytesPerSecond()
|
java.lang.Object |
getUserData(java.lang.Object key)
To retreive arbitrary objects against a peer. |
boolean |
hasReceivedBitField()
|
protected void |
initializeConnection()
|
boolean |
isChokedByMe()
Am I choking the peer. |
boolean |
isChokingMe()
Is the peer choking me. |
boolean |
isClosed()
|
boolean |
isDownloadDisabled()
|
boolean |
isDownloadDisabled(java.lang.Object key)
|
boolean |
isDownloadPossible()
checks several factors within the object so the caller wouldn't need to for convienience and speed. |
boolean |
isIncoming()
|
boolean |
isInterested()
Is the peer Interested in me. |
boolean |
isInteresting()
Am I Interested in the peer. |
boolean |
isLANLocal()
Is the connection within the local LAN network. |
boolean |
isOptimisticUnchoke()
|
boolean |
isPieceAvailable(int pieceNumber)
|
boolean |
isPriorityConnection()
|
boolean |
isRelativeSeed()
|
boolean |
isSafeForReconnect()
This method is called to check if it is safe to reconnect to a peer, i.e. |
boolean |
isSeed()
|
boolean |
isSnubbed()
|
boolean |
isStalledPendingLoad()
is peer waiting for a disk read with no network writes queued |
boolean |
isTCP()
|
boolean |
isUnchokeOverride()
|
boolean |
isUploadDisabled()
|
boolean |
isUploadDisabled(java.lang.Object key)
|
PEPeerTransport |
reconnect(boolean tryUDP,
boolean tryIPv6)
Attempts to reconnect to the same peer |
void |
removeListener(PEPeerListener listener)
Remove peer listener. |
void |
removeRateLimiter(LimitedRateGroup limiter,
boolean upload)
|
protected void |
removeRequest(DiskManagerReadRequest request)
|
void |
removeReservedPieceNumber(int piece_number)
|
DiskManagerReadRequest |
request(int pieceNumber,
int pieceOffset,
int pieceLength,
boolean return_duplicates)
|
void |
requestAllocationComplete()
|
boolean |
requestAllocationStarts(int[] base_priorities)
Two methods that allow a peer to aggregate the individual requests generated during an allocation cycle if so desired |
void |
sendBadPiece(int piece_number)
|
protected void |
sendBTHandshake()
|
void |
sendCancel(DiskManagerReadRequest request)
|
void |
sendChoke()
|
void |
sendHave(int pieceNumber)
|
protected void |
sendLazyHaves(int[] lazy_haves,
boolean immediate)
|
void |
sendRejectRequest(DiskManagerReadRequest request)
|
boolean |
sendRequestHint(int piece_number,
int offset,
int length,
int life)
Send a request hint to the peer. |
void |
sendStatsReply(java.util.Map reply)
|
void |
sendStatsRequest(java.util.Map request)
|
void |
sendUnChoke()
|
void |
setConsecutiveNoRequestCount(int num)
|
void |
setData(java.lang.String key,
java.lang.Object value)
To store arbitrary objects against a peer. |
void |
setDownloadDisabled(java.lang.Object key,
boolean disabled)
|
void |
setDownloadRateLimitBytesPerSecond(int bytes)
|
void |
setHaveAggregationEnabled(boolean enabled)
|
void |
setLastPiece(int pieceNumber)
|
void |
setOptimisticUnchoke(boolean is_optimistic)
|
void |
setPriorityConnection(boolean is_priority)
|
void |
setSnubbed(boolean b)
|
void |
setSuspendedLazyBitFieldEnabled(boolean enable)
Enable suspended lazy bitfield for this peer - we will appear incomplete until this is disabled, at which point (well, fairly soon after) the bitfield will be completed |
void |
setTaggableTransientProperty(java.lang.String key,
java.lang.Object value)
|
void |
setUniqueAnnounce(int _uniquePiece)
|
void |
setUploadDisabled(java.lang.Object key,
boolean disabled)
|
void |
setUploadHint(int spreadTime)
|
void |
setUploadRateLimitBytesPerSecond(int bytes)
|
void |
setUserData(java.lang.Object key,
java.lang.Object value)
To store arbitrary objects against a peer. |
void |
start()
Start message processing for the peer |
boolean |
supportsMessaging()
Whether or not this peer supports the advanced messaging API. |
java.lang.String |
toString()
|
boolean |
transferAvailable()
|
void |
updateAutoUploadPriority(java.lang.Object key,
boolean inc)
|
void |
updatePeerExchange()
Do any peer exchange processing/updating. |
Methods inherited from class org.gudy.azureus2.core3.logging.LogRelation |
---|
propogatedRelationText, queryForClass, queryForClass |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final LogIDs LOGID
protected final PEPeerControl manager
protected final DiskManager diskManager
protected final PiecePicker piecePicker
protected final int nbPieces
protected java.lang.String ip_resolved
protected PEPeerStats peer_stats
protected boolean choking_other_peer
protected volatile boolean closing
protected int connection_state
protected static boolean ENABLE_LAZY_BITFIELD
protected PeerMessageLimiter message_limiter
Constructor Detail |
---|
public PEPeerTransportProtocol(PEPeerControl _manager, java.lang.String _peer_source, NetworkConnection _connection, java.util.Map _initial_user_data)
public PEPeerTransportProtocol(PEPeerControl _manager, java.lang.String _peer_source, java.lang.String _ip, int _tcp_port, int _udp_port, boolean _use_tcp, boolean _require_crypto_handshake, byte _crypto_level, java.util.Map _initial_user_data)
Method Detail |
---|
public void start()
PEPeerTransport
start
in interface PEPeerTransport
protected void initializeConnection()
public java.lang.String getPeerSource()
getPeerSource
in interface PEPeer
protected void closeConnectionInternally(java.lang.String reason, boolean connect_failed, boolean network_failure)
reason
- protected void closeConnectionInternally(java.lang.String reason)
public void closeConnection(java.lang.String reason)
closeConnection
in interface PEPeerTransport
reason
- for closurepublic boolean isClosed()
isClosed
in interface PEPeer
public PEPeerTransport reconnect(boolean tryUDP, boolean tryIPv6)
PEPeerTransport
reconnect
in interface PEPeerTransport
tryUDP
- try to initate a UDP connection if true, just reestablish the previous state otherwisetryIPv6
- TODO
public boolean isSafeForReconnect()
PEPeerTransport
isSafeForReconnect
in interface PEPeerTransport
protected void sendBTHandshake()
public int getPeerState()
getPeerState
in interface PEPeer
public boolean isDownloadPossible()
PEPeer
isDownloadPossible
in interface PEPeer
public int getPercentDoneInThousandNotation()
PEPeer
getPercentDoneInThousandNotation
in interface PEPeer
public boolean transferAvailable()
transferAvailable
in interface PEPeerTransport
transferAvailable
in interface PEPeer
public DiskManagerReadRequest request(int pieceNumber, int pieceOffset, int pieceLength, boolean return_duplicates)
request
in interface PEPeerTransport
return_duplicates
- - if true and request already exists it will be returned, if false -> null
public int getRequestIndex(DiskManagerReadRequest request)
PEPeerTransport
getRequestIndex
in interface PEPeerTransport
public void sendCancel(DiskManagerReadRequest request)
sendCancel
in interface PEPeerTransport
public void sendHave(int pieceNumber)
sendHave
in interface PEPeerTransport
public void sendChoke()
sendChoke
in interface PEPeerTransport
sendChoke
in interface PEPeer
public void sendUnChoke()
sendUnChoke
in interface PEPeerTransport
sendUnChoke
in interface PEPeer
public void checkInterested()
checkInterested
in interface PEPeerTransport
protected void sendLazyHaves(int[] lazy_haves, boolean immediate)
public byte[] getId()
getId
in interface PEPeer
public java.lang.String getIp()
getIp
in interface PEPeer
public java.net.InetAddress getAlternativeIPv6()
getAlternativeIPv6
in interface PEPeer
public int getPort()
PEPeer
getPort
in interface PEPeer
public int getTCPListenPort()
PEPeer
getTCPListenPort
in interface PEPeer
public int getUDPListenPort()
PEPeer
getUDPListenPort
in interface PEPeer
public int getUDPNonDataListenPort()
PEPeer
getUDPNonDataListenPort
in interface PEPeer
public java.lang.String getClient()
getClient
in interface PEPeer
public boolean isIncoming()
isIncoming
in interface PEPeer
public boolean isOptimisticUnchoke()
isOptimisticUnchoke
in interface PEPeer
public void setOptimisticUnchoke(boolean is_optimistic)
setOptimisticUnchoke
in interface PEPeer
public PEPeerControl getControl()
getControl
in interface PEPeerTransport
public PEPeerManager getManager()
getManager
in interface PEPeer
public PEPeerStats getStats()
getStats
in interface PEPeer
public int[] getPriorityOffsets()
PEPeerTransport
getPriorityOffsets
in interface PEPeerTransport
public boolean requestAllocationStarts(int[] base_priorities)
PEPeerTransport
requestAllocationStarts
in interface PEPeerTransport
public void requestAllocationComplete()
requestAllocationComplete
in interface PEPeerTransport
public BitFlags getAvailable()
getAvailable
in interface PEPeer
public boolean isPieceAvailable(int pieceNumber)
isPieceAvailable
in interface PEPeer
pieceNumber
- int
public boolean isChokingMe()
PEPeer
isChokingMe
in interface PEPeer
public boolean isUnchokeOverride()
isUnchokeOverride
in interface PEPeer
public boolean isChokedByMe()
PEPeer
isChokedByMe
in interface PEPeer
public boolean isInteresting()
PEPeer
isInteresting
in interface PEPeer
public boolean isInterested()
PEPeer
isInterested
in interface PEPeer
public boolean isSeed()
isSeed
in interface PEPeer
public boolean isRelativeSeed()
isRelativeSeed
in interface PEPeer
public boolean isSnubbed()
isSnubbed
in interface PEPeer
public long getSnubbedTime()
getSnubbedTime
in interface PEPeer
public void setSnubbed(boolean b)
setSnubbed
in interface PEPeer
public void setUploadHint(int spreadTime)
setUploadHint
in interface PEPeer
public int getUploadHint()
getUploadHint
in interface PEPeer
public void setUniqueAnnounce(int _uniquePiece)
setUniqueAnnounce
in interface PEPeer
public int getUniqueAnnounce()
getUniqueAnnounce
in interface PEPeer
public java.lang.Object getData(java.lang.String key)
PEPeer
getData
in interface PEPeer
public void setData(java.lang.String key, java.lang.Object value)
PEPeer
setData
in interface PEPeer
public java.lang.Object getUserData(java.lang.Object key)
getUserData
in interface PEPeer
public void setUserData(java.lang.Object key, java.lang.Object value)
setUserData
in interface PEPeer
public java.lang.String getIPHostName()
PEPeer
getIPHostName
in interface PEPeer
public int getMaxNbRequests()
PEPeerTransport
getMaxNbRequests
in interface PEPeerTransport
public int getNbRequests()
getNbRequests
in interface PEPeerTransport
public java.util.List getExpiredRequests()
getExpiredRequests
in interface PEPeerTransport
protected void removeRequest(DiskManagerReadRequest request)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getString()
public void doKeepAliveCheck()
PEPeerTransport
doKeepAliveCheck
in interface PEPeerTransport
public void updateAutoUploadPriority(java.lang.Object key, boolean inc)
updateAutoUploadPriority
in interface PEPeer
public boolean doTimeoutChecks()
PEPeerTransport
doTimeoutChecks
in interface PEPeerTransport
public void doPerformanceTuningCheck()
PEPeerTransport
doPerformanceTuningCheck
in interface PEPeerTransport
public int getConnectionState()
PEPeerTransport
getConnectionState
in interface PEPeerTransport
public long getTimeSinceLastDataMessageReceived()
PEPeerTransport
getTimeSinceLastDataMessageReceived
in interface PEPeerTransport
public long getTimeSinceGoodDataReceived()
PEPeerTransport
getTimeSinceGoodDataReceived
in interface PEPeerTransport
public long getTimeSinceLastDataMessageSent()
PEPeerTransport
getTimeSinceLastDataMessageSent
in interface PEPeerTransport
public long getTimeSinceConnectionEstablished()
PEPeer
getTimeSinceConnectionEstablished
in interface PEPeer
public int getConsecutiveNoRequestCount()
getConsecutiveNoRequestCount
in interface PEPeer
public void setConsecutiveNoRequestCount(int num)
setConsecutiveNoRequestCount
in interface PEPeer
protected void decodeBTHandshake(BTHandshake handshake)
protected void decodeLTHandshake(LTHandshake handshake)
protected void decodeAZHandshake(AZHandshake handshake)
protected void decodeHaveAll(BTHaveAll have_all)
protected void decodeHaveNone(BTHaveNone have_none)
protected void decodeBitfield(BTBitfield bitfield)
public void setSuspendedLazyBitFieldEnabled(boolean enable)
PEPeer
setSuspendedLazyBitFieldEnabled
in interface PEPeer
protected void decodeMainlineDHTPort(BTDHTPort port)
protected void decodeChoke(BTChoke choke)
protected void decodeUnchoke(BTUnchoke unchoke)
protected void decodeInterested(BTInterested interested)
protected void decodeUninterested(BTUninterested uninterested)
protected void decodeHave(BTHave have)
protected void decodeAZHave(AZHave have)
protected long getBytesDownloaded()
public long getBytesRemaining()
getBytesRemaining
in interface PEPeer
public void sendBadPiece(int piece_number)
sendBadPiece
in interface PEPeerTransport
protected void decodeAZBadPiece(AZBadPiece bad_piece)
public void sendStatsRequest(java.util.Map request)
sendStatsRequest
in interface PEPeerTransport
sendStatsRequest
in interface PEPeer
protected void decodeAZStatsRequest(AZStatRequest request)
public void sendStatsReply(java.util.Map reply)
sendStatsReply
in interface PEPeerTransport
protected void decodeAZStatsReply(AZStatReply reply)
protected void decodeRequest(BTRequest request)
public void sendRejectRequest(DiskManagerReadRequest request)
sendRejectRequest
in interface PEPeer
protected void decodePiece(BTPiece piece)
protected void decodeCancel(BTCancel cancel)
protected void decodeRejectRequest(BTRejectRequest reject)
protected void calculatePiecePriorities()
protected void checkFast(BitFlags flags)
public void addRateLimiter(LimitedRateGroup limiter, boolean upload)
addRateLimiter
in interface PEPeer
public LimitedRateGroup[] getRateLimiters(boolean upload)
getRateLimiters
in interface PEPeer
public void removeRateLimiter(LimitedRateGroup limiter, boolean upload)
removeRateLimiter
in interface PEPeer
public void setUploadDisabled(java.lang.Object key, boolean disabled)
setUploadDisabled
in interface PEPeer
public void setDownloadDisabled(java.lang.Object key, boolean disabled)
setDownloadDisabled
in interface PEPeer
public boolean isUploadDisabled()
isUploadDisabled
in interface PEPeer
public boolean isUploadDisabled(java.lang.Object key)
public boolean isDownloadDisabled()
isDownloadDisabled
in interface PEPeer
public boolean isDownloadDisabled(java.lang.Object key)
public Connection getPluginConnection()
PEPeer
getPluginConnection
in interface PEPeer
public Message[] getSupportedMessages()
PEPeer
getSupportedMessages
in interface PEPeer
public boolean supportsMessaging()
PEPeer
supportsMessaging
in interface PEPeer
public int getMessagingMode()
getMessagingMode
in interface PEPeer
public byte[] getHandshakeReservedBytes()
getHandshakeReservedBytes
in interface PEPeer
public void setHaveAggregationEnabled(boolean enabled)
setHaveAggregationEnabled
in interface PEPeer
public boolean hasReceivedBitField()
hasReceivedBitField
in interface PEPeer
public long getUnchokedForMillis()
getUnchokedForMillis
in interface PEPeerTransport
public long getLatency()
getLatency
in interface PEPeerTransport
public java.lang.String getEncryption()
PEPeer
getEncryption
in interface PEPeer
public java.lang.String getProtocol()
getProtocol
in interface PEPeer
public java.lang.String getProtocolQualifier()
getProtocolQualifier
in interface PEPeer
public void addListener(PEPeerListener listener)
PEPeer
addListener
in interface PEPeer
public void removeListener(PEPeerListener listener)
PEPeer
removeListener
in interface PEPeer
public void updatePeerExchange()
PEPeerTransport
updatePeerExchange
in interface PEPeerTransport
protected void decodePeerExchange(AZStylePeerExchange exchange)
protected void decodeMetaData(AZUTMetaData metadata)
protected void decodeUploadOnly(UTUploadOnly message)
public boolean sendRequestHint(int piece_number, int offset, int length, int life)
PEPeer
sendRequestHint
in interface PEPeer
protected void decodeSuggestPiece(BTSuggestPiece hint)
protected void decodeAZRequestHint(AZRequestHint hint)
public int[] getRequestHint()
PEPeer
getRequestHint
in interface PEPeer
public void clearRequestHint()
clearRequestHint
in interface PEPeer
public PeerItem getPeerItemIdentity()
PEPeerTransport
getPeerItemIdentity
in interface PEPeerTransport
public int[] getReservedPieceNumbers()
PEPeer
getReservedPieceNumbers
in interface PEPeer
public void addReservedPieceNumber(int piece_number)
PEPeer
addReservedPieceNumber
in interface PEPeer
public void removeReservedPieceNumber(int piece_number)
removeReservedPieceNumber
in interface PEPeer
public int getIncomingRequestCount()
getIncomingRequestCount
in interface PEPeer
public int getOutgoingRequestCount()
getOutgoingRequestCount
in interface PEPeer
public int getOutboundDataQueueSize()
PEPeer
getOutboundDataQueueSize
in interface PEPeer
public boolean isStalledPendingLoad()
PEPeerTransport
isStalledPendingLoad
in interface PEPeerTransport
public int[] getIncomingRequestedPieceNumbers()
PEPeer
getIncomingRequestedPieceNumbers
in interface PEPeer
public int[] getOutgoingRequestedPieceNumbers()
PEPeer
getOutgoingRequestedPieceNumbers
in interface PEPeer
public int getPercentDoneOfCurrentIncomingRequest()
getPercentDoneOfCurrentIncomingRequest
in interface PEPeer
public int getPercentDoneOfCurrentOutgoingRequest()
getPercentDoneOfCurrentOutgoingRequest
in interface PEPeer
public long getLastMessageSentTime()
getLastMessageSentTime
in interface PEPeerTransport
public java.lang.String getRelationText()
LogRelation
getRelationText
in class LogRelation
public java.lang.Object[] getQueryableInterfaces()
LogRelation
getQueryableInterfaces
in class LogRelation
public int getLastPiece()
getLastPiece
in interface PEPeer
public void setLastPiece(int pieceNumber)
setLastPiece
in interface PEPeer
public boolean isLANLocal()
PEPeerTransport
isLANLocal
in interface PEPeerTransport
isLANLocal
in interface PEPeer
public boolean isTCP()
isTCP
in interface PEPeerTransport
public java.lang.String getNetwork()
getNetwork
in interface PEPeerTransport
public void setUploadRateLimitBytesPerSecond(int bytes)
setUploadRateLimitBytesPerSecond
in interface PEPeer
public int getUploadRateLimitBytesPerSecond()
getUploadRateLimitBytesPerSecond
in interface PEPeer
public void setDownloadRateLimitBytesPerSecond(int bytes)
setDownloadRateLimitBytesPerSecond
in interface PEPeer
public int getDownloadRateLimitBytesPerSecond()
getDownloadRateLimitBytesPerSecond
in interface PEPeer
public java.lang.String getClientNameFromPeerID()
getClientNameFromPeerID
in interface PEPeer
public java.lang.String getClientNameFromExtensionHandshake()
getClientNameFromExtensionHandshake
in interface PEPeer
public void setPriorityConnection(boolean is_priority)
setPriorityConnection
in interface PEPeer
public boolean isPriorityConnection()
isPriorityConnection
in interface PEPeer
protected java.util.List<java.lang.Integer> generateFastSet(byte[] hash, java.lang.String ip, int num_pieces, int num_required)
protected java.util.List<java.lang.Integer> generateFastSet(int num)
public int getTaggableType()
public java.lang.String getTaggableID()
public TaggableResolver getTaggableResolver()
public java.lang.Object getTaggableTransientProperty(java.lang.String key)
public void setTaggableTransientProperty(java.lang.String key, java.lang.Object value)
public void generateEvidence(IndentWriter writer)
generateEvidence
in interface PEPeerTransport
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |