|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gudy.azureus2.pluginsimpl.remote.RPObject org.gudy.azureus2.pluginsimpl.remote.torrent.RPTorrent
public class RPTorrent
Field Summary | |
---|---|
protected Torrent |
delegate
|
byte[] |
hash
|
java.lang.String |
name
|
long |
size
|
Fields inherited from class org.gudy.azureus2.pluginsimpl.remote.RPObject |
---|
__delegate, _dispatcher, _object_id, next_key, object_registry, object_registry_reverse |
Constructor Summary | |
---|---|
protected |
RPTorrent(Torrent _delegate)
|
Method Summary | |
---|---|
RPReply |
_process(RPRequest request)
|
protected void |
_setDelegate(java.lang.Object _delegate)
|
java.lang.Object |
_setLocal()
|
static RPTorrent |
create(Torrent _delegate)
|
java.lang.Object |
getAdditionalProperty(java.lang.String name)
Access to top-level properties in the torrent |
java.net.URL |
getAnnounceURL()
|
TorrentAnnounceURLList |
getAnnounceURLList()
get the announce list for multi-tracker torrents. |
Torrent |
getClone()
|
java.lang.String |
getComment()
|
java.lang.String |
getCreatedBy()
|
long |
getCreationDate()
UNIX epoch format in seconds |
java.lang.String |
getEncoding()
|
TorrentFile[] |
getFiles()
|
byte[] |
getHash()
|
java.net.URL |
getMagnetURI()
Gets the magnet URI for the torrent - throws exception if not available |
java.util.Map |
getMapProperty(java.lang.String name)
Gets a previously set map value |
java.lang.String |
getName()
|
long |
getPieceCount()
|
byte[][] |
getPieces()
|
long |
getPieceSize()
|
java.lang.String |
getPluginStringProperty(java.lang.String name)
Get a property specific to this plugin |
long |
getSize()
If size is 0 then this is an "external" torrent and we only know its hash (and name constructed from hash). |
boolean |
isComplete()
|
boolean |
isDecentralised()
A decentralised torrent uses the DHT only as a "tracker" |
boolean |
isDecentralisedBackupEnabled()
Decentralised backup permits the DHT to be used as a tracker when the "real" tracker is unavailable |
boolean |
isDecentralisedBackupRequested()
|
boolean |
isPrivate()
A private torrent is either explicitly private via info/private or has decentralised backup disabled and peer exchange disabled |
boolean |
isSimpleTorrent()
Returns true if the torrent is a single file torrent, false if it is a multi file torrent. |
Torrent |
removeAdditionalProperties()
Removal all non-standard properties (excluding plugin-properties below) |
void |
save()
Saves the torrent to its persistent location |
void |
setAnnounceURL(java.net.URL url)
|
void |
setComment(java.lang.String comment)
|
void |
setComplete(java.io.File data_dir)
sets the torrent complete - i.e. |
void |
setDecentralisedBackupRequested(boolean requested)
By default torrents with OK trackers are not tracked in the DHT. |
void |
setDefaultEncoding()
|
void |
setEncoding(java.lang.String encoding)
|
void |
setMapProperty(java.lang.String name,
java.util.Map value)
Sets a map property in the torrent, retrievable via getMapProperty |
void |
setPluginStringProperty(java.lang.String name,
java.lang.String value)
Set a property specific to this plugin |
void |
setPrivate(boolean priv)
|
boolean |
wasCreatedByUs()
|
byte[] |
writeToBEncodedData()
|
void |
writeToFile(java.io.File file)
|
java.util.Map |
writeToMap()
|
Methods inherited from class org.gudy.azureus2.pluginsimpl.remote.RPObject |
---|
_fixupLocal, _getDelegate, _getName, _getOID, _lookupLocal, _lookupLocal, _refresh, _setRemote, getDispatcher, notSupported, notSupported |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected transient Torrent delegate
public java.lang.String name
public long size
public byte[] hash
Constructor Detail |
---|
protected RPTorrent(Torrent _delegate)
Method Detail |
---|
public static RPTorrent create(Torrent _delegate)
protected void _setDelegate(java.lang.Object _delegate)
_setDelegate
in class RPObject
public java.lang.Object _setLocal() throws RPException
_setLocal
in class RPObject
RPException
public RPReply _process(RPRequest request)
_process
in class RPObject
public java.lang.String getName()
getName
in interface Torrent
public java.net.URL getAnnounceURL()
getAnnounceURL
in interface Torrent
public void setAnnounceURL(java.net.URL url)
setAnnounceURL
in interface Torrent
public TorrentAnnounceURLList getAnnounceURLList()
Torrent
getAnnounceURLList
in interface Torrent
public boolean isDecentralised()
Torrent
isDecentralised
in interface Torrent
public boolean isDecentralisedBackupEnabled()
Torrent
isDecentralisedBackupEnabled
in interface Torrent
public void setDecentralisedBackupRequested(boolean requested)
Torrent
setDecentralisedBackupRequested
in interface Torrent
public boolean isDecentralisedBackupRequested()
isDecentralisedBackupRequested
in interface Torrent
public boolean isPrivate()
Torrent
isPrivate
in interface Torrent
public boolean wasCreatedByUs()
wasCreatedByUs
in interface Torrent
public void setPrivate(boolean priv)
setPrivate
in interface Torrent
public byte[] getHash()
getHash
in interface Torrent
public long getSize()
Torrent
getSize
in interface Torrent
public java.lang.String getComment()
getComment
in interface Torrent
public void setComment(java.lang.String comment)
setComment
in interface Torrent
public long getCreationDate()
Torrent
getCreationDate
in interface Torrent
public java.lang.String getCreatedBy()
getCreatedBy
in interface Torrent
public long getPieceSize()
getPieceSize
in interface Torrent
public long getPieceCount()
getPieceCount
in interface Torrent
public byte[][] getPieces()
getPieces
in interface Torrent
public java.net.URL getMagnetURI()
Torrent
getMagnetURI
in interface Torrent
public java.lang.String getEncoding()
getEncoding
in interface Torrent
public void setEncoding(java.lang.String encoding)
setEncoding
in interface Torrent
public void setDefaultEncoding()
setDefaultEncoding
in interface Torrent
public TorrentFile[] getFiles()
getFiles
in interface Torrent
public java.lang.Object getAdditionalProperty(java.lang.String name)
Torrent
getAdditionalProperty
in interface Torrent
public Torrent removeAdditionalProperties()
Torrent
removeAdditionalProperties
in interface Torrent
public void setPluginStringProperty(java.lang.String name, java.lang.String value)
Torrent
setPluginStringProperty
in interface Torrent
public java.lang.String getPluginStringProperty(java.lang.String name)
Torrent
getPluginStringProperty
in interface Torrent
public void setMapProperty(java.lang.String name, java.util.Map value)
Torrent
setMapProperty
in interface Torrent
name
- should be unique across plugins (i.e. prefix it with something unique)value
- bencodable Map valuepublic java.util.Map getMapProperty(java.lang.String name)
Torrent
getMapProperty
in interface Torrent
name
- should be unique across plugins (i.e. prefix it with something unique)
setMapProperty
public java.util.Map writeToMap() throws TorrentException
writeToMap
in interface Torrent
TorrentException
public byte[] writeToBEncodedData() throws TorrentException
writeToBEncodedData
in interface Torrent
TorrentException
public void writeToFile(java.io.File file) throws TorrentException
writeToFile
in interface Torrent
TorrentException
public void save() throws TorrentException
Torrent
save
in interface Torrent
TorrentException
public void setComplete(java.io.File data_dir) throws TorrentException
Torrent
setComplete
in interface Torrent
TorrentException
public boolean isComplete()
isComplete
in interface Torrent
public boolean isSimpleTorrent()
Torrent
isSimpleTorrent
in interface Torrent
public Torrent getClone() throws TorrentException
getClone
in interface Torrent
TorrentException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |