org.apache.tapestry5.internal.services.javascript

## Class ModuleDispatcher

- java.lang.Object
- - org.apache.tapestry5.internal.services.javascript.ModuleDispatcher

- All Implemented Interfaces:
    Dispatcher

      public class ModuleDispatcher
      extends Object
      implements Dispatcher

  Handler contributed to `AssetDispatcher` with key "modules". It interprets the extra path as a module name, and searches for the corresponding JavaScript module. Unlike normal assets, modules do not include any kind of checksum in the URL, and do not set a far-future expires header.
  See Also:
    `ModuleManager`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ModuleDispatcher(ModuleManager moduleManager, ResourceStreamer streamer, OperationTracker tracker, PathConstructor pathConstructor, JavaScriptStackSource javaScriptStackSource, JavaScriptStackPathConstructor javaScriptStackPathConstructor, LocalizationSetter localizationSetter, String prefix, String assetPrefix, boolean compress)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `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

    - #### ModuleDispatcher

          public ModuleDispatcher(ModuleManager moduleManager,
                                  ResourceStreamer streamer,
                                  OperationTracker tracker,
                                  PathConstructor pathConstructor,
                                  JavaScriptStackSource javaScriptStackSource,
                                  JavaScriptStackPathConstructor javaScriptStackPathConstructor,
                                  LocalizationSetter localizationSetter,
                                  String prefix,
                                  @Symbol(value="tapestry.asset-path-prefix")
                                  String assetPrefix,
                                  boolean compress)

  - ### 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`

5.6.4 - Copyright © 2003-2021 The Apache Software Foundation.