1 /*******************************************************************************
2 * Copyright (c) 2012 Association for Decentralized Information Management
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.maps.tile;
16 * Interface for queue'ing a set of map tile requests. The tiles will be
17 * requested from the provider that has been set for the queue.
19 * @author Tuukka Lehtonen
21 public interface ITileJobQueue {
24 * Add a request for the specified tile with the specified listener. The
25 * listener will be notified depending on how the job progresses.
27 * @param key the requested tile
28 * @param listener the listener that will be notified of request result
30 public void addJob(TileKey key, ITileListener listener);
33 * Used for removing jobs from the job queue by using the specified filter.
34 * Any not-started tile requests for which the filter returns
35 * <code>false</code> will be removed from the queue.
37 * @param filter filter that shall return <code>false</code> for tile
38 * requests to be removed from the queue
40 public void filterQueries(IFilter<TileKey> filter);
43 * Sets the tile provider used by this queue to perform tile requests.
45 * @param provider the provider to use from now on
47 public void setTileProvider(ITileProvider provider);