
com.frostwire.jlibtorrent.alerts.DhtImmutableItemAlert Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jlibtorrent Show documentation
Show all versions of jlibtorrent Show documentation
A swig Java interface for libtorrent by the makers of FrostWire.
package com.frostwire.jlibtorrent.alerts;
import com.frostwire.jlibtorrent.Entry;
import com.frostwire.jlibtorrent.Session;
import com.frostwire.jlibtorrent.Sha1Hash;
import com.frostwire.jlibtorrent.swig.dht_immutable_item_alert;
/**
* This alert is posted as a response to a call to {@link Session#dhtGetItem(Sha1Hash)},
* looking up immutable items in the DHT.
*
* @author gubatron
* @author aldenml
*/
public final class DhtImmutableItemAlert extends AbstractAlert {
public DhtImmutableItemAlert(dht_immutable_item_alert alert) {
super(alert);
}
/**
* The target hash of the immutable item. This must
* match the sha-1 hash of the bencoded form of the item.
*
* @return
*/
public Sha1Hash getTarget() {
return new Sha1Hash(alert.getTarget());
}
/**
* the data for this item
*
* @return
*/
public Entry getItem() {
return new Entry(alert.getItem());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy