FileDocCategorySizeDatePackage
UploadSession.javaAPI DocAzureus 3.0.3.42420Fri Jul 21 01:14:38 BST 2006com.aelitis.azureus.core.peermanager.uploadslots

UploadSession

public class UploadSession extends Object

Fields Summary
protected static final int
TYPE_DOWNLOAD
protected static final int
TYPE_SEED
private final org.gudy.azureus2.core3.peer.impl.PEPeerTransport
peer
private final int
session_type
Constructors Summary
protected UploadSession(org.gudy.azureus2.core3.peer.impl.PEPeerTransport _peer, int _session_type)

	
	
	       
		this.peer = _peer;
		this.session_type = _session_type;		
	
Methods Summary
protected intgetSessionType()

  return session_type;  
protected java.lang.StringgetStatsTrace()

		String n = peer.getManager().getDisplayName();
		String t = session_type == TYPE_DOWNLOAD ? "DOWNLOADING" : "SEEDING";		
		String p = " : [" +peer.getClient()+ "] " +peer.getIp()+ " :" +peer.getPort();		
		String s = " || (D: " +DisplayFormatters.formatByteCountToKiBEtcPerSec( peer.getStats().getDataReceiveRate() )+
							  ") (U: " +DisplayFormatters.formatByteCountToKiBEtcPerSec( peer.getStats().getDataSendRate() )+ ")";		
		return "[" +n+ "] " + t + p + s;
	
protected booleanisSameSession(com.aelitis.azureus.core.peermanager.uploadslots.UploadSession session)

		if( session == null )  return false;
		return this.peer == session.peer;
	
protected voidstart()

		UnchokerUtil.performChokeUnchoke( null, peer );
	
protected voidstop()

		UnchokerUtil.performChokeUnchoke( peer, null );