Package org.wicketstuff.offline.mode
Class ServiceWorker
java.lang.Object
org.apache.wicket.request.resource.ResourceReference
org.apache.wicket.request.resource.PackageResourceReference
org.apache.wicket.request.resource.JavaScriptResourceReference
org.wicketstuff.offline.mode.ServiceWorker
- All Implemented Interfaces:
Serializable,IClusterable
The actual service worker which applies the URLs of the offline cache entries to the client side
cache with the given name.
- Author:
- Tobias Soloschenko.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.wicket.request.resource.ResourceReference
ResourceReference.Key, ResourceReference.LambdaResourceReference, ResourceReference.UrlAttributes -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedServiceWorker(String cacheName, List<OfflineCacheEntry> offlineCacheEntries) Creates the service worker -
Method Summary
Modifier and TypeMethodDescriptionstatic ServiceWorkerGets the current service worker instanceIf the service worker resource is shipped the first time the script is filled with the URLs of the resources to be cached.Methods inherited from class org.apache.wicket.request.resource.PackageResourceReference
getMinifiedName, getUrlAttributes, readBuffered, removeCompressFlagIfUnnecessaryMethods inherited from class org.apache.wicket.request.resource.ResourceReference
canBeRegistered, equals, getExtension, getKey, getLocale, getName, getScope, getStyle, getVariation, hashCode, of, of, toString
-
Constructor Details
-
ServiceWorker
Creates the service worker- Parameters:
cacheName- the name of the cacheofflineCacheEntries- the entries to be cached
-
-
Method Details
-
getInstance
Gets the current service worker instance- Returns:
- the service worker instance
-
getResource
If the service worker resource is shipped the first time the script is filled with the URLs of the resources to be cached.- Overrides:
getResourcein classJavaScriptResourceReference- Returns:
- the java script package resource to provide the script with the URLs to be cached
-
getDependencies
- Overrides:
getDependenciesin classResourceReference
-