Package org.oscim.layers.tile
Class TileLoader
java.lang.Object
java.lang.Thread
org.oscim.utils.PausableThread
org.oscim.layers.tile.TileLoader
- All Implemented Interfaces:
Runnable,ITileDataSink
- Direct Known Subclasses:
BitmapTileLoader,VectorTileLoader
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidcancel()voidcompleted(QueryResult result) Callback to be called by TileDataSource when finished loading or on failure.abstract voiddispose()protected voiddoWork()Called when this thread is not paused and should do its work.protected Stringprotected intvoidgo()protected booleanhasWork()protected abstract booleanvoidprocess(MapElement element) Called by TileDataSourcevoidsetTileImage(Bitmap bitmap) Called by TileDataSourceMethods inherited from class org.oscim.utils.PausableThread
afterPause, afterRun, awaitPausing, finish, isCanceled, isPausing, pause, proceed, runMethods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
Field Details
-
mTile
currently processed tile
-
-
Constructor Details
-
TileLoader
-
-
Method Details
-
loadTile
-
go
public void go() -
doWork
protected void doWork()Description copied from class:PausableThreadCalled when this thread is not paused and should do its work.- Specified by:
doWorkin classPausableThread
-
getThreadName
- Specified by:
getThreadNamein classPausableThread- Returns:
- the name of this thread.
-
getThreadPriority
protected int getThreadPriority()- Overrides:
getThreadPriorityin classPausableThread- Returns:
- the priority of this thread. The default value is
Thread.NORM_PRIORITY.
-
hasWork
protected boolean hasWork()- Specified by:
hasWorkin classPausableThread- Returns:
- true if this thread has some work to do, false otherwise.
-
dispose
public abstract void dispose() -
cancel
public abstract void cancel() -
completed
Callback to be called by TileDataSource when finished loading or on failure. MUST BE CALLED IN ANY CASE!- Specified by:
completedin interfaceITileDataSink
-
process
Called by TileDataSource- Specified by:
processin interfaceITileDataSink
-
setTileImage
Called by TileDataSource- Specified by:
setTileImagein interfaceITileDataSink
-