Class UrlAsset
java.lang.Object
org.apache.tapestry5.internal.services.AbstractAsset
org.apache.tapestry5.internal.services.UrlAsset
- All Implemented Interfaces:
Asset
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the underlying Resource for the Asset.Returns a URL that can be passed, unchanged, to the client in order for it to access the resource.Methods inherited from class org.apache.tapestry5.internal.services.AbstractAsset
isInvariant, toString
-
Constructor Details
-
UrlAsset
-
-
Method Details
-
toClientURL
Description copied from interface:Asset
Returns a URL that can be passed, unchanged, to the client in order for it to access the resource. The same value is returned fromtoString()
. Tapestry's built-in asset types (context and classpath) always incorporate a checksum as part of the path, and alternate implementations are encouraged to do so as well. In addition, Tapestry ensures that context and classpath assets have a far-future expires header (to ensure aggressive caching by the client). Note that starting in Tapestry 5.4, it is expected that Asset instances recognize when the underlying Resource's content has changed, and update the clientURL to reflect the new content's checksum. This wasn't an issue in earlier releases where the clientURL incorporated a version number. Finally, starting in 5.4, this value will often be variant: the exact URL returned will depend on whether the underlying resource content is compressable, whether the currentRequest
supports compression.- See Also:
-
getResource
Description copied from interface:Asset
Returns the underlying Resource for the Asset.
-