All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.frostwire.jlibtorrent.alerts.TrackerErrorAlert Maven / Gradle / Ivy

There is a newer version: 1.2.0.18
Show newest version
package com.frostwire.jlibtorrent.alerts;

import com.frostwire.jlibtorrent.ErrorCode;
import com.frostwire.jlibtorrent.swig.tracker_error_alert;

/**
 * This alert is generated on tracker time outs, premature disconnects, invalid response or
 * a HTTP response other than "200 OK". From the alert you can get the handle to the torrent
 * the tracker belongs to.
 * 

* The ``times_in_row`` member says how many times in a row this tracker has failed. * ``status_code`` is the code returned from the HTTP server. 401 means the tracker needs * authentication, 404 means not found etc. If the tracker timed out, the code will be set * to 0. * * @author gubatron * @author aldenml */ public final class TrackerErrorAlert extends TrackerAlert { public TrackerErrorAlert(tracker_error_alert alert) { super(alert); } public int getTimesInRow() { return alert.getTimes_in_row(); } public int getStatusCode() { return alert.getStatus_code(); } public ErrorCode getError() { return new ErrorCode(alert.getError()); } /** * The message associated with this error. * * @return */ public String errorMessage() { return alert.error_message(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy