org.apache.tapestry5.internal.services
Class ResourceDigestManagerImpl

java.lang.Object
  extended by org.apache.tapestry5.internal.services.ResourceDigestManagerImpl
All Implemented Interfaces:
ResourceDigestManager, InvalidationEventHub, InvalidationListener

public class ResourceDigestManagerImpl
extends Object
implements ResourceDigestManager, InvalidationListener


Constructor Summary
ResourceDigestManagerImpl(ResourceDigestGenerator digestGenerator, ResourceChangeTracker resourceChangeTracker)
           
 
Method Summary
 void addInvalidationListener(InvalidationListener listener)
          Adds a listener, who needs to know when an underlying resource of a given category has changed (so that the receiver may discard any cached data that may have been invalidated).
 String getDigest(Resource resource)
          Returns the digest for the given path.
 long getTimeModified(Resource resource)
           
 void listenForInvalidations()
           
 void objectWasInvalidated()
          Invoked to indicate that some object is invalid.
 boolean requiresDigest(Resource resource)
          Returns true if the path requires that the client URL for the resource include a digest to validate that the client is authorized to access the resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceDigestManagerImpl

public ResourceDigestManagerImpl(ResourceDigestGenerator digestGenerator,
                                 ResourceChangeTracker resourceChangeTracker)
Method Detail

listenForInvalidations

@PostInjection
public void listenForInvalidations()

getDigest

public String getDigest(Resource resource)
Description copied from interface: ResourceDigestManager
Returns the digest for the given path.

Specified by:
getDigest in interface ResourceDigestManager
Returns:
the digest, or null if the resource does not exist

getTimeModified

public long getTimeModified(Resource resource)

requiresDigest

public boolean requiresDigest(Resource resource)
Description copied from interface: ResourceDigestManager
Returns true if the path requires that the client URL for the resource include a digest to validate that the client is authorized to access the resource.

Specified by:
requiresDigest in interface ResourceDigestManager
Returns:
true if digest is required for the resource
See Also:
ResourceDigestGenerator.requiresDigest(String)

addInvalidationListener

public void addInvalidationListener(InvalidationListener listener)
Description copied from interface: InvalidationEventHub
Adds a listener, who needs to know when an underlying resource of a given category has changed (so that the receiver may discard any cached data that may have been invalidated). Does nothing in production mode.

Specified by:
addInvalidationListener in interface InvalidationEventHub

objectWasInvalidated

public void objectWasInvalidated()
Description copied from interface: InvalidationListener
Invoked to indicate that some object is invalid. The receiver should clear its cache.

Specified by:
objectWasInvalidated in interface InvalidationListener


Copyright © 2003-2012 The Apache Software Foundation.