org.norther.tammi.spray.media
Interface CachedMediaProvider

All Superinterfaces:
CacheClient, MediaProvider, Refreshable
All Known Subinterfaces:
ServletMediaProvider
All Known Implementing Classes:
DefaultCachedMediaProvider, DefaultServletMediaProvider

public interface CachedMediaProvider
extends MediaProvider, CacheClient

Extends media providers by caching support.

Author:
Ilkka Priha

Method Summary
 Resource getCachedResource(String path)
          Gets a cached media content resource.
 ObjectName getResourceCacheName()
          Gets the resource cache.
 void removeCachedResource(String path)
          Removes a cached media content resource.
 void setCachedResource(String path, Resource res)
          Sets a cached media content resource.
 void setCachedResource(String path, Resource res, int freq)
          Sets a cached media content resource with an expiration frequency.
 void setResourceCacheName(ObjectName cache)
          Sets the resource cache.
 
Methods inherited from interface org.norther.tammi.spray.media.MediaProvider
getDefaultIndex, getMediaKey, getResource, isLocalizedContent, setDefaultIndex, setLocalizedContent, setMediaKey
 
Methods inherited from interface org.norther.tammi.core.cache.CacheClient
clearCached, expireCached, expireFraction, getCache, isCachingDisabled, removeCache, setCachingDisabled
 
Methods inherited from interface org.norther.tammi.core.base.Refreshable
getRefreshed, refresh
 

Method Detail

getResourceCacheName

ObjectName getResourceCacheName()
Gets the resource cache.

Returns:
the name of the cache or a query.

setResourceCacheName

void setResourceCacheName(ObjectName cache)
Sets the resource cache.

Parameters:
cache - the name of the cache or a query.

getCachedResource

Resource getCachedResource(String path)
Gets a cached media content resource.

Parameters:
path - the content path.
Returns:
the cached resource or null.

setCachedResource

void setCachedResource(String path,
                       Resource res)
Sets a cached media content resource.

Parameters:
path - the content path.
res - the cached resource.

setCachedResource

void setCachedResource(String path,
                       Resource res,
                       int freq)
Sets a cached media content resource with an expiration frequency.

Parameters:
path - the content path.
res - the cached resource.
freq - the expiration frequency.

removeCachedResource

void removeCachedResource(String path)
Removes a cached media content resource.

Parameters:
path - the content path.


Copyright © 2004 The Norther Organization. All rights reserved.