Uses of Record Class
com.vaadin.flow.server.streams.TransferContext
Packages that use TransferContext
-
Uses of TransferContext in com.vaadin.flow.server.streams
Methods in com.vaadin.flow.server.streams that return TransferContextModifier and TypeMethodDescriptionprotected TransferContextAbstractDownloadHandler.getTransferContext(DownloadEvent transferEvent) protected TransferContextAbstractFileUploadHandler.getTransferContext(UploadEvent transferEvent) protected TransferContextFileDownloadHandler.getTransferContext(DownloadEvent transferEvent) protected TransferContextInMemoryUploadHandler.getTransferContext(UploadEvent transferEvent) protected abstract TransferContextTransferProgressAwareHandler.getTransferContext(T transferEvent) This method is used to get the transfer context from the transfer events (e.g.Methods in com.vaadin.flow.server.streams with parameters of type TransferContextModifier and TypeMethodDescriptiondefault voidTransferProgressListener.onComplete(TransferContext context, long transferredBytes) Called when the transfer is started.default voidTransferProgressListener.onError(TransferContext context, IOException reason) Called when the transfer is failed.default voidTransferProgressListener.onProgress(TransferContext context, long transferredBytes, long totalBytes) Called periodically during the transfer to report progress.default voidTransferProgressListener.onStart(TransferContext context) Called when the data transfer is started.static longTransferUtil.transfer(InputStream inputStream, OutputStream outputStream, TransferContext transferContext, Collection<TransferProgressListener> listeners) Transfers data from the given input stream to the output stream while notifying the progress to the given listeners.Method parameters in com.vaadin.flow.server.streams with type arguments of type TransferContextModifier and TypeMethodDescriptionTransferProgressAwareHandler.onProgress(SerializableTriConsumer<TransferContext, Long, Long> progressHandler) Adds a listener to be notified of transfer progress with giving the transfer context object and with the default progress interval.TransferProgressAwareHandler.onProgress(SerializableTriConsumer<TransferContext, Long, Long> progressHandler, long progressIntervalInBytes) Adds a listener to be notified of transfer progress with giving the transfer context object and with the given interval.TransferProgressAwareHandler.whenComplete(SerializableBiConsumer<TransferContext, Boolean> completeOrTerminateHandler) Adds a listener to be notified when the transfer is completed successfully or with an error with the transfer context object given as an input.TransferProgressAwareHandler.whenStart(SerializableConsumer<TransferContext> startHandler) Adds a listener to be notified when the transfer starts that receives the transfer context as input.