001// License: GPL. For details, see Readme.txt file.
002package org.openstreetmap.gui.jmapviewer.interfaces;
003
004import org.openstreetmap.gui.jmapviewer.Tile;
005
006/**
007 * Interface for implementing a tile loading job. Tiles are usually loaded via HTTP
008 * or from a file.
009 *
010 * @author Dirk Stöcker
011 */
012public interface TileJob extends Runnable {
013
014    /**
015     * Function to return the tile associated with the job
016     *
017     * @return {@link Tile} to be handled
018     */
019    Tile getTile();
020
021    /**
022     * submits download job to backend.
023     */
024    void submit();
025
026    /**
027     * submits download job to backend.
028     * @param force true if the load should skip all the caches (local & remote)
029     */
030    void submit(boolean force);
031}