Class ResourceDigestManagerImpl
java.lang.Object
org.apache.tapestry5.internal.services.ResourceDigestManagerImpl
- All Implemented Interfaces:
InvalidationEventHub
,ResourceDigestManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addInvalidationCallback
(Runnable callback) Adds a callback that is invoked when an underlying tracked resource has changed.void
Adds a callback, as a function that receives a list of strings and also returns a list of strings, that is invoked when one or more listed underlying tracked resource have changed.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).void
clearOnInvalidation
(Map<?, ?> map) Adds a callback that clears the map.void
fireInvalidationEvent
(List<String> resources) Notify resource-specific invalidations to listeners.Returns the digest for the given path.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.
-
Constructor Details
-
ResourceDigestManagerImpl
public ResourceDigestManagerImpl()
-
-
Method Details
-
getDigest
Description copied from interface:ResourceDigestManager
Returns the digest for the given path. As of 5.4, simple returns null.- Specified by:
getDigest
in interfaceResourceDigestManager
- Returns:
- the digest, or null if the resource does not exist
-
requiresDigest
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. As of 5.4, simply returns false.- Specified by:
requiresDigest
in interfaceResourceDigestManager
- Returns:
- true if digest is required for the resource
- See Also:
-
addInvalidationListener
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 interfaceInvalidationEventHub
-
addInvalidationCallback
Description copied from interface:InvalidationEventHub
Adds a callback that is invoked when an underlying tracked resource has changed. Does nothing in production mode.- Specified by:
addInvalidationCallback
in interfaceInvalidationEventHub
-
clearOnInvalidation
Description copied from interface:InvalidationEventHub
Adds a callback that clears the map.- Specified by:
clearOnInvalidation
in interfaceInvalidationEventHub
-
addInvalidationCallback
Description copied from interface:InvalidationEventHub
Adds a callback, as a function that receives a list of strings and also returns a list of strings, that is invoked when one or more listed underlying tracked resource have changed. An empty list should be considered as all resources being changed and any caches needing to be cleared. The return value of the function should be a non-null, but possibly empty, list of other resources that also need to be invalidated in a recursive fashion. This method does nothing in production mode.- Specified by:
addInvalidationCallback
in interfaceInvalidationEventHub
-
fireInvalidationEvent
Description copied from interface:InvalidationEventHub
Notify resource-specific invalidations to listeners.- Specified by:
fireInvalidationEvent
in interfaceInvalidationEventHub
-