Class AssetDispatcher
java.lang.Object
org.apache.tapestry5.internal.services.AssetDispatcher
- All Implemented Interfaces:
Dispatcher
@UsesMappedConfiguration(AssetRequestHandler.class)
@Marker(AssetRequestDispatcher.class)
public class AssetDispatcher
extends Object
implements Dispatcher
Recognizes requests where the path begins with "/asset/" (actually, as defined by the
SymbolConstants.ASSET_PATH_PREFIX
symbol), and delivers the content therein as a bytestream. Also
handles requests that are simply polling for a change to the file (including checking the ETag in the
request against the asset's checksum.-
Constructor Summary
ConstructorsConstructorDescriptionAssetDispatcher
(Map<String, AssetRequestHandler> configuration, PathConstructor pathConstructor, String assetPathPrefix) -
Method Summary
-
Constructor Details
-
AssetDispatcher
public AssetDispatcher(Map<String, AssetRequestHandler> configuration, PathConstructor pathConstructor, @Symbol("tapestry.asset-path-prefix") String assetPathPrefix)
-
-
Method Details
-
dispatch
Description copied from interface:Dispatcher
Analyzes the incoming request and performs an appropriate operation for each.- Specified by:
dispatch
in interfaceDispatcher
- Returns:
- true if a response was delivered, false if the dispatcher did not handle the request (and a search for a handler should continue)
- Throws:
IOException
-