Interface DownloadStrategy

All Known Implementing Classes:
PluggableDownloadStrategy

public interface DownloadStrategy
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    matches(String requestUri)
    Returns true if the DownloadStrategy is supported for the given url path.
    void
    serveFile(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
    Serves the file for the given request and response.
  • Method Details

    • matches

      boolean matches(String requestUri)
      Returns true if the DownloadStrategy is supported for the given url path.
      Parameters:
      requestUri - the result of HttpServletRequest.getRequestURI() converted to lowercase
    • serveFile

      void serveFile(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws DownloadException
      Serves the file for the given request and response.
      Throws:
      DownloadException - if there was an error during serving of the file.