Package com.vaadin.flow.server.streams
Class InputStreamDownloadHandler
java.lang.Object
com.vaadin.flow.server.streams.TransferProgressAwareHandler<DownloadEvent,R>
com.vaadin.flow.server.streams.AbstractDownloadHandler<InputStreamDownloadHandler>
com.vaadin.flow.server.streams.InputStreamDownloadHandler
- All Implemented Interfaces:
DownloadHandler
,ElementRequestHandler
,Serializable
Download handler for serving an input stream for client download.
- Since:
- 24.8
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreate an input stream download handler for given event -> response function. -
Method Summary
Modifier and TypeMethodDescriptionvoid
handleDownloadRequest
(DownloadEvent downloadEvent) Method that is called when the client wants to download from the url stored for this specific handler registration.Methods inherited from class com.vaadin.flow.server.streams.AbstractDownloadHandler
getContentType, getTransferContext, inline, isInline
Methods inherited from class com.vaadin.flow.server.streams.TransferProgressAwareHandler
addTransferProgressListener, getListeners, notifyError, onProgress, onProgress, onProgress, onProgress, whenComplete, whenComplete, whenStart, whenStart
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.vaadin.flow.server.streams.DownloadHandler
handleRequest
Methods inherited from interface com.vaadin.flow.server.streams.ElementRequestHandler
getDisabledUpdateMode, getUrlPostfix, isAllowInert
-
Constructor Details
-
InputStreamDownloadHandler
Create an input stream download handler for given event -> response function.- Parameters:
callback
- serializable function for handling download
-
-
Method Details
-
handleDownloadRequest
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
-