FileDocCategorySizeDatePackage
PeerStatsImpl.javaAPI DocAzureus 3.0.3.42603Thu Nov 30 10:16:56 GMT 2006org.gudy.azureus2.pluginsimpl.local.peers

PeerStatsImpl

public class PeerStatsImpl extends Object implements PeerStats
author
parg

Fields Summary
private PeerManagerImpl
peer_manager
private PEPeerManager
manager
private PEPeerStats
delegate
private Peer
owner
Constructors Summary
public PeerStatsImpl(PeerManagerImpl _peer_manager, Peer _owner, PEPeerStats _delegate)

		peer_manager	= _peer_manager;
		manager			= peer_manager.getDelegate();
		delegate		= _delegate;
		owner			= _owner;
	
Methods Summary
public voiddiscarded(int bytes)

		delegate.bytesDiscarded( bytes );
		
		manager.discarded( delegate.getPeer(), bytes );
	
public PEPeerStatsgetDelegate()

		return( delegate );
	
public intgetDownloadAverage()

		return( (int)delegate.getDataReceiveRate());
	
public intgetReception()

		return( (int)delegate.getSmoothDataReceiveRate());
	
public intgetStatisticSentAverage()

		return( (int)delegate.getEstimatedUploadRateOfPeer());
	
public longgetTimeSinceConnectionEstablished()

		return( peer_manager.getTimeSinceConnectionEstablished( owner ));
	
public intgetTotalAverage()

		return( (int)delegate.getEstimatedDownloadRateOfPeer());
	
public longgetTotalDiscarded()

		return( delegate.getTotalBytesDiscarded());
	
public longgetTotalReceived()

		return( delegate.getTotalDataBytesReceived());
	
public longgetTotalSent()

		return( delegate.getTotalDataBytesSent());
	
public intgetUploadAverage()

		return( (int)delegate.getDataSendRate());
	
public voidreceived(int bytes)

		delegate.dataBytesReceived( bytes );
		
		manager.dataBytesReceived( delegate.getPeer(), bytes );