Class InputStreamDownloadHandler

All Implemented Interfaces:
DownloadHandler, ElementRequestHandler, Serializable

public class InputStreamDownloadHandler extends AbstractDownloadHandler<InputStreamDownloadHandler>
Download handler for serving an input stream for client download.
Since:
24.8
See Also:
  • Constructor Details

    • InputStreamDownloadHandler

      public InputStreamDownloadHandler(InputStreamDownloadCallback callback)
      Create an input stream download handler for given event -> response function.
      Parameters:
      callback - serializable function for handling download
  • Method Details

    • handleDownloadRequest

      public void handleDownloadRequest(DownloadEvent downloadEvent) throws IOException
      Description copied from interface: DownloadHandler
      Method that is called when the client wants to download from the url stored for this specific handler registration.
      Parameters:
      downloadEvent - download event containing the necessary data for writing the response
      Throws:
      IOException - if an IO error occurred during download