Package com.vaadin.flow.server.streams
Class InputStreamDownloadHandler
java.lang.Object
com.vaadin.flow.server.streams.TransferProgressAwareHandler<DownloadEvent,InputStreamDownloadHandler>
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 TypeMethodDescriptionvoidhandleDownloadRequest(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, isInlineMethods inherited from class com.vaadin.flow.server.streams.TransferProgressAwareHandler
addTransferProgressListener, getListeners, notifyError, onProgress, onProgress, onProgress, onProgress, setTransferUI, whenComplete, whenComplete, whenStart, whenStartMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.server.streams.DownloadHandler
handleRequestMethods 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:DownloadHandlerMethod 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
-