public class ApplicationCacheHandler extends Object implements com.google.gwt.core.client.EntryPoint
| Modifier and Type | Class and Description |
|---|---|
static class |
ApplicationCacheHandler.CacheEvent |
| Modifier and Type | Field and Description |
|---|---|
static int |
CHECKING |
static int |
DOWNLOADING |
static int |
IDLE |
static int |
OBSOLETE |
static int |
UNCACHED |
static int |
UPDATEREADY |
| Constructor and Description |
|---|
ApplicationCacheHandler() |
| Modifier and Type | Method and Description |
|---|---|
static com.google.gwt.event.shared.HandlerRegistration |
addApplicationCacheHandler(ApplicationCacheEvent.Handler handler) |
protected void |
hookAllListeners(ApplicationCacheHandler instance)
Hooks all listeners to the specified instance.
|
static boolean |
isSupported() |
protected void |
onCached()
Called when a cached event is triggered
|
protected void |
onChecking()
Called when a checking event is triggered
|
protected void |
onDownloading()
Called when a downloading event is triggered
|
protected void |
onError()
Called when an error event is triggered.
|
void |
onModuleLoad()
Initializes and starts the monitoring.
|
protected void |
onNoUpdate()
Called when a noupdate event is triggered
|
protected void |
onObsolete()
Called when an error event is triggered.
|
protected void |
onProgress(ProgressEvent event)
Called when a progress event is triggered
|
protected void |
onUpdateReady()
Called when a update ready event is triggered
|
protected void |
requestUpdate(boolean force)
Called when a new version of the application cache
has been detected.
|
static void |
swapCache() |
static void |
updateCache()
Asks the application cache to update itself.
|
static void |
updateCacheNative()
Asks the application cache to update itself.
|
public static final int UNCACHED
public static final int IDLE
public static final int CHECKING
public static final int DOWNLOADING
public static final int UPDATEREADY
public static final int OBSOLETE
public static com.google.gwt.event.shared.HandlerRegistration addApplicationCacheHandler(ApplicationCacheEvent.Handler handler)
public void onModuleLoad()
onModuleLoad in interface com.google.gwt.core.client.EntryPointpublic static void updateCache()
public static void updateCacheNative()
public static void swapCache()
protected void onCached()
event - The event.protected void onChecking()
event - The event.protected void onDownloading()
event - The event.protected void onNoUpdate()
event - The event.protected void onUpdateReady()
event - The event.protected void onProgress(ProgressEvent event)
event - The event.protected void onError()
event - The error event.protected void onObsolete()
event - The error event.protected void requestUpdate(boolean force)
force - true to force reloading the site without asking the user.public static boolean isSupported()
protected final void hookAllListeners(ApplicationCacheHandler instance)
instance - the instance to hook the listeners to.Copyright © 2015. All rights reserved.