|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nasa.worldwind.util.SessionCacheUtils
public class SessionCacheUtils
A collection of utility methods for retrieving and managing data in the SessionCache.
| Constructor Summary | |
|---|---|
SessionCacheUtils()
|
|
| Method Summary | |
|---|---|
static Capabilities |
getOrRetrieveSessionCapabilities(java.net.URL url,
RetrievalService retrievalService,
SessionCache cache,
java.lang.Object cacheKey,
AbsentResourceList absentResourceList,
long resourceID,
java.beans.PropertyChangeListener propertyListener,
java.lang.String propertyName)
Checks a session cache for a specified key, and if present attempts to interpret the cache entry as a Capabilities document. |
static Capabilities |
getSessionCapabilities(SessionCache cache,
java.lang.Object cacheKey,
java.lang.String name)
Checks a session cache for a specified key, and if present attempts to interpret the cache entry as a Capabilities document. |
protected static java.io.InputStream |
inputStreamFromSource(java.lang.Object source)
|
protected static Capabilities |
parseCapabilities(java.lang.Object source,
java.lang.String name)
|
static void |
retrieveSessionData(java.net.URL url,
RetrievalService retrievalService,
SessionCache cache,
java.lang.Object cacheKey,
AbsentResourceList absentResourceList,
long resourceID,
java.beans.PropertyChangeListener propertyListener,
java.lang.String propertyName)
Asynchronously retrieves the contents of a specified URL using a specified RetrievalService. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SessionCacheUtils()
| Method Detail |
|---|
public static Capabilities getOrRetrieveSessionCapabilities(java.net.URL url,
RetrievalService retrievalService,
SessionCache cache,
java.lang.Object cacheKey,
AbsentResourceList absentResourceList,
long resourceID,
java.beans.PropertyChangeListener propertyListener,
java.lang.String propertyName)
Capabilities document. If the key does not map to a Capabilities document for any reason, this attempts to
asynchronously retrieve the Capabilities from a specified URL, and returns null.
url - the URL contents to retrieve.retrievalService - the retrieval service to use.cache - the session cache.cacheKey - the key to identify the object in the session cache.absentResourceList - the absent resource list to update.resourceID - the resource ID to use in the absent resource list.propertyListener - the property change listener which is fired when the retrieved data is available.propertyName - the property name to fire when retrieved data is available.
java.lang.IllegalArgumentException - if either the url, retrieval service, cache or cache key are null.
public static Capabilities getSessionCapabilities(SessionCache cache,
java.lang.Object cacheKey,
java.lang.String name)
Capabilities document. If the key does not exist in the cache, or the cache entry cannot be interpreted as a
Capabilities document, this returns null. If the entry exists, but must be converted to a Capabilities document,
this overrides the previous cache entry with the the newly converted Capabilities.
cache - the session cache.cacheKey - the key to identify the object in the session cache.name - the name to use in logging messages.
java.lang.IllegalArgumentException - if either the cache or cache key are null.protected static java.io.InputStream inputStreamFromSource(java.lang.Object source)
protected static Capabilities parseCapabilities(java.lang.Object source,
java.lang.String name)
public static void retrieveSessionData(java.net.URL url,
RetrievalService retrievalService,
SessionCache cache,
java.lang.Object cacheKey,
AbsentResourceList absentResourceList,
long resourceID,
java.beans.PropertyChangeListener propertyListener,
java.lang.String propertyName)
URL using a specified RetrievalService. If successful, this places the URL contents in a specified session cache with a specified key.
This either marks the resource as available or missing, depending on whether the retrieval succeeds or fails.
Finally, this optionally notifies the caller that the retrieval has succeeded by firing a property change event.
If either the property listener or property name are null, that functionality is disabled.
url - the URL contents to retrieve.retrievalService - the retrieval service to use.cache - the cache which receives the retrieved data.cacheKey - the cache key which identifies where the retrieved data is placed in the session
cache.absentResourceList - the absent resource list to update.resourceID - the resource ID to use in the absent resource list.propertyListener - the property change listener which is fired when the retrieved data is available.propertyName - the property name to fire when retrieved data is available.
java.lang.IllegalArgumentException - if any of the url, retrieval service, cache, or cache key are null.
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||