net.sf.torrentsniffer.torrent
Class TorrentState

java.lang.Object
  extended bynet.sf.torrentsniffer.torrent.TorrentState

public class TorrentState
extends java.lang.Object

Represents the information retrieved by doing a Torrent Scrape. This information contains the number of seeds (complete) and peers (incomplete).

Author:
Larry Williams

Field Summary
(package private)  int complete
           
(package private)  int downloaded
           
(package private)  int incomplete
           
(package private)  java.lang.String name
           
 
Constructor Summary
TorrentState()
           
 
Method Summary
 int getComplete()
           
 int getDownloaded()
           
 int getIncomplete()
           
 java.lang.String getName()
           
 void setComplete(int complete)
           
 void setDownloaded(int downloaded)
           
 void setIncomplete(int incomplete)
           
 void setName(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

complete

int complete

downloaded

int downloaded

incomplete

int incomplete

name

java.lang.String name
Constructor Detail

TorrentState

public TorrentState()
Method Detail

getComplete

public int getComplete()
Returns:
Returns the number of peers with the entire file, i.e. seeders.

setComplete

public void setComplete(int complete)
Parameters:
complete - The complete to set.

getDownloaded

public int getDownloaded()
Returns:
Returns the total number of times the tracker has registered a completion ("event=complete", i.e. a client finished downloading the torrent.

setDownloaded

public void setDownloaded(int downloaded)
Parameters:
downloaded - The downloaded to set.

getIncomplete

public int getIncomplete()
Returns:
Returns the number of non-seeder peers, aka "leechers".

setIncomplete

public void setIncomplete(int incomplete)
Parameters:
incomplete - The incomplete to set.

getName

public java.lang.String getName()
Returns:
Returns the torrent's internal name, as specified by the "name" file in the info section of the .torrent file.

setName

public void setName(java.lang.String name)
Parameters:
name - The name to set.


Copyright © 2004 Larry Williams. All Rights Reserved.