org.springframework.extensions.surf.resource
Class AbstractCachingResourceLoader

java.lang.Object
  extended by org.springframework.extensions.surf.resource.AbstractResourceLoader
      extended by org.springframework.extensions.surf.resource.AbstractCachingResourceLoader
All Implemented Interfaces:
ResourceLoader
Direct Known Subclasses:
AlfrescoResourceLoader, CMISResourceLoader, VirtualizedWebappResourceLoader

public abstract class AbstractCachingResourceLoader
extends AbstractResourceLoader

Provides caching of resource objects by object id

Author:
muzquiano

Field Summary
 
Fields inherited from class org.springframework.extensions.surf.resource.AbstractResourceLoader
endpointId, protocolId
 
Constructor Summary
AbstractCachingResourceLoader(String protocolId, String endpointId)
          Instantiates a new abstract resource loader
 
Method Summary
abstract  Resource buildResource(String objectId)
          Builds the resource bound to the given object id
 Resource load(String objectId)
          Loads the resource with the given object id
 void setCacheTimeout(long cacheTimeout)
          Sets the cache timeout.
 
Methods inherited from class org.springframework.extensions.surf.resource.AbstractResourceLoader
getEndpointId, getProtocolId, getServiceRegistry, init, setServiceRegistry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCachingResourceLoader

public AbstractCachingResourceLoader(String protocolId,
                                     String endpointId)
Instantiates a new abstract resource loader

Parameters:
protocolId - the protocol id
endpointId - the endpoint id
Method Detail

setCacheTimeout

public void setCacheTimeout(long cacheTimeout)
Sets the cache timeout.

Parameters:
cacheTimeout - the new cache timeout

load

public Resource load(String objectId)
              throws ResourceLoaderException
Description copied from interface: ResourceLoader
Loads the resource with the given object id

Returns:
Throws:
ResourceLoaderException

buildResource

public abstract Resource buildResource(String objectId)
                                throws ResourceLoaderException
Builds the resource bound to the given object id

Parameters:
objectId -
Returns:
resource
Throws:
ResourceLoaderException


Copyright © 2009 SpringSource, Inc. All Rights Reserved.