Search in sources :

Example 1 with ResourceDownloaderCancelledException

use of com.biglybt.pif.utils.resourcedownloader.ResourceDownloaderCancelledException in project BiglyBT by BiglySoftware.

the class ResourceDownloaderAlternateImpl method cancel.

@Override
public void cancel() {
    setCancelled();
    try {
        this_mon.enter();
        result = new ResourceDownloaderCancelledException(this);
        cancelled = true;
        informFailed((ResourceDownloaderException) result);
        done_sem.release();
        if (current_downloader != null) {
            current_downloader.cancel();
        }
    } finally {
        this_mon.exit();
    }
}
Also used : ResourceDownloaderCancelledException(com.biglybt.pif.utils.resourcedownloader.ResourceDownloaderCancelledException)

Example 2 with ResourceDownloaderCancelledException

use of com.biglybt.pif.utils.resourcedownloader.ResourceDownloaderCancelledException in project BiglyBT by BiglySoftware.

the class ResourceDownloaderMetaRefreshImpl method cancel.

@Override
public void cancel() {
    setCancelled();
    try {
        this_mon.enter();
        result = new ResourceDownloaderCancelledException(this);
        cancelled = true;
        informFailed((ResourceDownloaderException) result);
        done_sem.release();
        if (current_downloader != null) {
            current_downloader.cancel();
        }
    } finally {
        this_mon.exit();
    }
}
Also used : ResourceDownloaderCancelledException(com.biglybt.pif.utils.resourcedownloader.ResourceDownloaderCancelledException)

Example 3 with ResourceDownloaderCancelledException

use of com.biglybt.pif.utils.resourcedownloader.ResourceDownloaderCancelledException in project BiglyBT by BiglySoftware.

the class ResourceDownloaderRetryImpl method cancel.

@Override
public void cancel() {
    setCancelled();
    try {
        this_mon.enter();
        result = new ResourceDownloaderCancelledException(this);
        cancelled = true;
        informFailed((ResourceDownloaderException) result);
        done_sem.release();
        if (current_downloader != null) {
            current_downloader.cancel();
        }
    } finally {
        this_mon.exit();
    }
}
Also used : ResourceDownloaderCancelledException(com.biglybt.pif.utils.resourcedownloader.ResourceDownloaderCancelledException)

Example 4 with ResourceDownloaderCancelledException

use of com.biglybt.pif.utils.resourcedownloader.ResourceDownloaderCancelledException in project BiglyBT by BiglySoftware.

the class ResourceDownloaderTorrentImpl method cancel.

@Override
public void cancel() {
    setCancelled();
    try {
        this_mon.enter();
        result = new ResourceDownloaderCancelledException(this);
        cancelled = true;
        informFailed((ResourceDownloaderException) result);
        done_sem.release();
        if (current_downloader != null) {
            current_downloader.cancel();
        }
    } finally {
        this_mon.exit();
    }
}
Also used : ResourceDownloaderCancelledException(com.biglybt.pif.utils.resourcedownloader.ResourceDownloaderCancelledException)

Example 5 with ResourceDownloaderCancelledException

use of com.biglybt.pif.utils.resourcedownloader.ResourceDownloaderCancelledException in project BiglyBT by BiglySoftware.

the class ResourceDownloaderURLImpl method cancel.

@Override
public void cancel() {
    setCancelled();
    cancel_download = true;
    try {
        this_mon.enter();
        if (input_stream != null) {
            try {
                input_stream.close();
            } catch (Throwable e) {
            }
        }
    } finally {
        this_mon.exit();
    }
    informFailed(new ResourceDownloaderCancelledException(this));
}
Also used : ResourceDownloaderCancelledException(com.biglybt.pif.utils.resourcedownloader.ResourceDownloaderCancelledException)

Aggregations

ResourceDownloaderCancelledException (com.biglybt.pif.utils.resourcedownloader.ResourceDownloaderCancelledException)5