]> gerrit.simantics Code Review - simantics/district.git/blob - org.simantics.district.maps/src/org/simantics/maps/tile/ITileJobQueue.java
Share some projects for Simantics District
[simantics/district.git] / org.simantics.district.maps / src / org / simantics / maps / tile / ITileJobQueue.java
1 /*******************************************************************************
2  * Copyright (c) 2012 Association for Decentralized Information Management
3  * in Industry THTH ry.
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
8  *
9  * Contributors:
10  *     VTT Technical Research Centre of Finland - initial API and implementation
11  *******************************************************************************/
12 package org.simantics.maps.tile;
13
14
15 /**
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.
18  * 
19  * @author Tuukka Lehtonen
20  */
21 public interface ITileJobQueue {
22
23     /**
24      * Add a request for the specified tile with the specified listener. The
25      * listener will be notified depending on how the job progresses.
26      * 
27      * @param key the requested tile
28      * @param listener the listener that will be notified of request result
29      */
30     public void addJob(TileKey key, ITileListener listener);
31
32     /**
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.
36      * 
37      * @param filter filter that shall return <code>false</code> for tile
38      *        requests to be removed from the queue
39      */
40     public void filterQueries(IFilter<TileKey> filter);
41
42     /**
43      * Sets the tile provider used by this queue to perform tile requests.
44      * 
45      * @param provider the provider to use from now on
46      */
47     public void setTileProvider(ITileProvider provider);
48
49 }