org.osmdroid.tileprovider.modules
Class MapTileModuleProviderBase

java.lang.Object
  extended by org.osmdroid.tileprovider.modules.MapTileModuleProviderBase
All Implemented Interfaces:
OpenStreetMapTileProviderConstants
Direct Known Subclasses:
MapTileDownloader, MapTileFileStorageProviderBase

public abstract class MapTileModuleProviderBase
extends Object
implements OpenStreetMapTileProviderConstants

An abstract base class for modular tile providers

Author:
Marc Kurtz, Neil Boyd

Nested Class Summary
 class MapTileModuleProviderBase.CantContinueException
          Thrown by a tile provider module in TileLoader.loadTile() to signal that it can no longer function properly.
protected  class MapTileModuleProviderBase.TileLoader
          Load the requested tile.
 
Field Summary
 
Fields inherited from interface org.osmdroid.tileprovider.constants.OpenStreetMapTileProviderConstants
CACHE_MAPTILECOUNT_DEFAULT, DEBUGMODE, DEFAULT_MAXIMUM_CACHED_FILE_AGE, MAXIMUM_ZOOMLEVEL, MINIMUM_ZOOMLEVEL, NUMBER_OF_TILE_DOWNLOAD_THREADS, NUMBER_OF_TILE_FILESYSTEM_THREADS, ONE_DAY, ONE_HOUR, ONE_MINUTE, ONE_SECOND, ONE_WEEK, ONE_YEAR, OSMDROID_PATH, TILE_DOWNLOAD_MAXIMUM_QUEUE_SIZE, TILE_EXPIRY_TIME_MILLISECONDS, TILE_FILESYSTEM_MAXIMUM_QUEUE_SIZE, TILE_MAX_CACHE_SIZE_BYTES, TILE_PATH_BASE, TILE_PATH_EXTENSION, TILE_TRIM_CACHE_SIZE_BYTES
 
Constructor Summary
MapTileModuleProviderBase(int pThreadPoolSize, int pPendingQueueSize)
           
 
Method Summary
 void detach()
          Detach, we're shutting down - Stops all workers.
abstract  int getMaximumZoomLevel()
          Gets the maximum zoom level this tile provider can provide
abstract  int getMinimumZoomLevel()
          Gets the minimum zoom level this tile provider can provide
protected abstract  String getName()
          Gets the human-friendly name assigned to this tile provider.
protected abstract  String getThreadGroupName()
          Gets the name assigned to the thread for this provider.
protected abstract  Runnable getTileLoader()
          It is expected that the implementation will construct an internal member which internally implements a MapTileModuleProviderBase.TileLoader.
abstract  boolean getUsesDataConnection()
          Returns true if implementation uses a data connection, false otherwise.
 void loadMapTileAsync(MapTileRequestState pState)
           
abstract  void setTileSource(ITileSource tileSource)
          Sets the tile source for this tile provider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapTileModuleProviderBase

public MapTileModuleProviderBase(int pThreadPoolSize,
                                 int pPendingQueueSize)
Method Detail

getName

protected abstract String getName()
Gets the human-friendly name assigned to this tile provider.

Returns:
the thread name

getThreadGroupName

protected abstract String getThreadGroupName()
Gets the name assigned to the thread for this provider.

Returns:
the thread name

getTileLoader

protected abstract Runnable getTileLoader()
It is expected that the implementation will construct an internal member which internally implements a MapTileModuleProviderBase.TileLoader. This method is expected to return a that internal member to methods of the parent methods.

Returns:
the internal member of this tile provider.

getUsesDataConnection

public abstract boolean getUsesDataConnection()
Returns true if implementation uses a data connection, false otherwise. This value is used to determine if this provider should be skipped if there is no data connection.

Returns:
true if implementation uses a data connection, false otherwise

getMinimumZoomLevel

public abstract int getMinimumZoomLevel()
Gets the minimum zoom level this tile provider can provide

Returns:
the minimum zoom level

getMaximumZoomLevel

public abstract int getMaximumZoomLevel()
Gets the maximum zoom level this tile provider can provide

Returns:
the maximum zoom level

setTileSource

public abstract void setTileSource(ITileSource tileSource)
Sets the tile source for this tile provider.

Parameters:
tileSource - the tile source

loadMapTileAsync

public void loadMapTileAsync(MapTileRequestState pState)

detach

public void detach()
Detach, we're shutting down - Stops all workers.



Copyright © 2012. All Rights Reserved.