public class AttachmentWatcher
extends java.lang.Thread
FileObserver
due to its unreliability
See VideoFileWatcher
for another example of this implementationModifier and Type | Class and Description |
---|---|
static interface |
AttachmentWatcher.Listener |
Constructor and Description |
---|
AttachmentWatcher(MapView mapView,
java.io.File attDir) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(AttachmentWatcher.Listener l) |
void |
cache(java.io.File f)
Add a file to the cache
Used to caching outside this class
|
void |
dispose() |
java.util.Set<java.io.File> |
getCache()
Get attachments cache
|
static AttachmentWatcher |
getInstance() |
void |
removeListener(AttachmentWatcher.Listener l) |
void |
run() |
void |
start() |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, stop, stop, suspend, toString, yield
public AttachmentWatcher(MapView mapView, java.io.File attDir)
public static AttachmentWatcher getInstance()
public void start()
start
in class java.lang.Thread
public void dispose()
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public java.util.Set<java.io.File> getCache()
public void cache(java.io.File f)
f
- Filepublic void addListener(AttachmentWatcher.Listener l)
public void removeListener(AttachmentWatcher.Listener l)