Package org.apache.tapestry5.internal.services.assets

## Class StackAssetRequestHandler

- java.lang.Object
- - org.apache.tapestry5.internal.services.assets.StackAssetRequestHandler

- All Implemented Interfaces:
    `AssetRequestHandler`

      public class StackAssetRequestHandler
      extends java.lang.Object
      implements AssetRequestHandler

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `StackAssetRequestHandler​(org.slf4j.Logger logger, LocalizationSetter localizationSetter, ResourceStreamer resourceStreamer, OperationTracker tracker, JavaScriptStackAssembler javaScriptStackAssembler, JavaScriptStackSource stackSource)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `handleAssetRequest​(Request request, Response response, java.lang.String extraPath)` | Given a request targeted (via the handler id) to the specific handler, process the request.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### StackAssetRequestHandler

          public StackAssetRequestHandler​(org.slf4j.Logger logger,
                                          LocalizationSetter localizationSetter,
                                          ResourceStreamer resourceStreamer,
                                          OperationTracker tracker,
                                          JavaScriptStackAssembler javaScriptStackAssembler,
                                          JavaScriptStackSource stackSource)

  - ### Method Detail

    - #### handleAssetRequest

          public boolean handleAssetRequest​(Request request,
                                            Response response,
                                            java.lang.String extraPath)
                                     throws java.io.IOException

      Description copied from interface: `AssetRequestHandler`
      Given a request targeted (via the handler id) to the specific handler, process the request. The handler is responsible for processing the request, sending back either a bytestream (via `Response.getOutputStream(String)`) or an error response (via `Response.sendError(int, String)`). It is the handler's responsibility to allow for client-side caching (possibly sending an `HttpServletResponse.SC_NOT_MODIFIED` response). The handler should return true if it provided a response. If the handler returns false, this indicates that the extra path did not identify a known asset (virtual or otherwise) and the AssetDispatcher service should send a `HttpServletResponse.SC_NOT_FOUND` response. Starting in Tapestry 5.4, the handler is informed by the `AssetRequestDispatcher` whether or not the content should be compressed (this is determined based on information in the URL).
      Specified by:
        `handleAssetRequest` in interface `AssetRequestHandler`
      Parameters:
        `request` - incoming asset request
        `response` - used to send a response to client
        `extraPath` - additional path to identify the specific asset
      Returns:
        true if request was handled (and response sent), false if asset not found
      Throws:
        `java.io.IOException`