Package com.vaadin.flow.server.streams
Class InMemoryUploadHandler
java.lang.Object
com.vaadin.flow.server.streams.TransferProgressAwareHandler<UploadEvent,InMemoryUploadHandler>
com.vaadin.flow.server.streams.InMemoryUploadHandler
- All Implemented Interfaces:
ElementRequestHandler,UploadHandler,Serializable
public class InMemoryUploadHandler
extends TransferProgressAwareHandler<UploadEvent,InMemoryUploadHandler>
implements UploadHandler
Upload handler for storing the upload in-memory. Data is returned as a
byte[] to the given successHandler.- Since:
- 24.8
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected TransferContextgetTransferContext(UploadEvent transferEvent) This method is used to get the transfer context from the transfer events (e.g.voidhandleUploadRequest(UploadEvent event) Method that is called when the client wants to upload data to the url stored for this specific handler registration.Methods inherited from class com.vaadin.flow.server.streams.TransferProgressAwareHandler
addTransferProgressListener, getListeners, notifyError, onProgress, onProgress, onProgress, onProgress, 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.ElementRequestHandler
getDisabledUpdateMode, getUrlPostfix, isAllowInertMethods inherited from interface com.vaadin.flow.server.streams.UploadHandler
getFileCountMax, getFileSizeMax, getRequestSizeMax, handleRequest, responseHandled
-
Constructor Details
-
InMemoryUploadHandler
-
-
Method Details
-
handleUploadRequest
Description copied from interface:UploadHandlerMethod that is called when the client wants to upload data to the url stored for this specific handler registration.After upload of all files is done the method
UploadHandler.responseHandled(boolean, VaadinResponse)will be called.- Specified by:
handleUploadRequestin interfaceUploadHandler- Parameters:
event- upload event containing the necessary data for getting the request- Throws:
IOException- if an error occurs during upload
-
getTransferContext
Description copied from class:TransferProgressAwareHandlerThis method is used to get the transfer context from the transfer events (e.g.DownloadEvent).- Specified by:
getTransferContextin classTransferProgressAwareHandler<UploadEvent,InMemoryUploadHandler> - Parameters:
transferEvent- the transfer event- Returns:
- the transfer context
-