001// License: GPL. For details, see LICENSE file. 002package org.openstreetmap.josm.data.imagery; 003 004import java.util.Map; 005 006import org.openstreetmap.gui.jmapviewer.interfaces.TileLoader; 007import org.openstreetmap.gui.jmapviewer.interfaces.TileLoaderListener; 008 009/** 010 * Factory creating TileLoaders for layers 011 * 012 * @author Wiktor Niesiobędzki 013 * @since 8526 014 */ 015@FunctionalInterface 016public interface TileLoaderFactory { 017 018 /** 019 * Creates TileLoaderFactory - factory that creates tile loaders with all options already set 020 * 021 * @param listener that will be notified, when tile has finished loading 022 * @param headers that will be sent with requests to TileSource. <code>null</code> indicates none 023 * @param minimumExpiryTime minimum expiry time 024 * @return TileLoader that uses both of above 025 */ 026 TileLoader makeTileLoader(TileLoaderListener listener, Map<String, String> headers, long minimumExpiryTime); 027}