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

com.mindsnacks.zinc.classes.jobs.AbstractZincDownloadJob Maven / Gradle / Ivy

There is a newer version: 1.6.2
Show newest version
package com.mindsnacks.zinc.classes.jobs;

import com.mindsnacks.zinc.exceptions.ZincRuntimeException;

import java.net.URL;

/**
 * User: NachoSoto
 * Date: 9/3/13
 */
public abstract class AbstractZincDownloadJob extends ZincJob {
    protected final ZincRequestExecutor mRequestExecutor;
    protected final URL mUrl;
    protected final Class mClass;

    public AbstractZincDownloadJob(final ZincRequestExecutor requestExecutor, final URL url, final Class theClass) {
        mRequestExecutor = requestExecutor;
        mUrl = url;
        mClass = theClass;
    }

    public static class DownloadFileError extends ZincRuntimeException {
        public DownloadFileError(final String message) {
            super(message);
        }

        public DownloadFileError(final String message, final Throwable cause) {
            super(message, cause);
        }
    }

    @Override
    protected String getJobName() {
        return super.getJobName() + " (" + mUrl +")";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy