NVelocity.Runtime.Resource
Interface ResourceCache

Interface that defines the shape of a pluggable resource cache for the included ResourceManager *

Method Summary
System.Collections.IEnumerator enumerateKeys()
         returns an Iterator of Keys in the cache
NVelocity.Runtime.Resource.Resource get(object resourceKey)
         retrieves a Resource from the cache *
void initialize(NVelocity.Runtime.RuntimeServices rs)
         initializes the ResourceCache. Will be called before any utilization *
NVelocity.Runtime.Resource.Resource put(object resourceKey, NVelocity.Runtime.Resource.Resource resource)
         stores a Resource in the cache *
NVelocity.Runtime.Resource.Resource remove(object resourceKey)
         removes a Resource from the cache *


Method Detail

enumerateKeys

public System.Collections.IEnumerator enumerateKeys()

returns an Iterator of Keys in the cache


get

public NVelocity.Runtime.Resource.Resource get(object resourceKey)

retrieves a Resource from the cache *

Parameters:
resourceKey - key for Resource to be retrieved
Returns:
Resource specified or null if not found

initialize

public void initialize(NVelocity.Runtime.RuntimeServices rs)

initializes the ResourceCache. Will be called before any utilization *

Parameters:
rs - RuntimeServices to use for logging, etc

put

public NVelocity.Runtime.Resource.Resource put(object resourceKey,
                                               NVelocity.Runtime.Resource.Resource resource)

stores a Resource in the cache *

Parameters:
resourceKey - key to associate with the Resource
resource - Resource to be stored
Returns:
existing Resource stored under this key, or null if none

remove

public NVelocity.Runtime.Resource.Resource remove(object resourceKey)

removes a Resource from the cache *

Parameters:
resourceKey - resource to be removed
Resource - stored under key