org.apache.tapestry5.internal.services
Class AssetDispatcher

java.lang.Object
  extended by org.apache.tapestry5.internal.services.AssetDispatcher
All Implemented Interfaces:
Dispatcher

@UsesMappedConfiguration(value=AssetRequestHandler.class)
public class AssetDispatcher
extends Object
implements Dispatcher

Recognizes requests where the path begins with "/asset/" and delivers the content therein as a bytestream. Also handles requests that are simply polling for a change to the file.

See Also:
ResourceStreamer, ClasspathAssetAliasManager, AssetRequestHandler

Constructor Summary
AssetDispatcher(Map<String,AssetRequestHandler> configuration, String applicationVersion, String applicationFolder, String assetPathPrefix)
           
 
Method Summary
 boolean dispatch(Request request, Response response)
          Analyzes the incoming request and performs an appropriate operation for each.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssetDispatcher

public AssetDispatcher(Map<String,AssetRequestHandler> configuration,
                       @Symbol(value="tapestry.application-version")
                       String applicationVersion,
                       @Symbol(value="tapestry.application-folder")
                       String applicationFolder,
                       @Symbol(value="tapestry.asset-path-prefix")
                       String assetPathPrefix)
Method Detail

dispatch

public boolean dispatch(Request request,
                        Response response)
                 throws IOException
Description copied from interface: Dispatcher
Analyzes the incoming request and performs an appropriate operation for each.

Specified by:
dispatch in interface Dispatcher
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


Copyright © 2003-2012 The Apache Software Foundation.