com.vaadin.flow.component.upload.
Class ProgressUpdateEvent
All Implemented Interfaces:
ProgressUpdateEvent is sent to track progress of upload.
Author:
Vaadin Ltd.
See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorsConstructorDescriptionProgressUpdateEvent
(Upload source, long readBytes, long contentLength) Deprecated.
since 24.4.ProgressUpdateEvent
(Upload source, long readBytes, long contentLength, String fileName) Event constructor method to construct a new progress event.
-
Method Summary
Modifier and TypeMethodDescriptionlong
Get total file size.
Get the file name.
long
Get bytes transferred for this update.
Upload where the event occurred.
Methods inherited from class com.vaadin.flow.component.ComponentEvent
getSource, isFromClient, unregisterListener
Methods inherited from class java.util.EventObject
toString
-
Constructor Details
-
ProgressUpdateEvent
@Deprecated(since="24.4") public ProgressUpdateEvent(Upload source, long readBytes, long contentLength) Deprecated.since 24.4. UseProgressUpdateEvent(Upload, long, long, String)
Event constructor method to construct a new progress event.
Parameters:
source
- the source of the filereadBytes
- bytes transferredcontentLength
- total size of file currently being uploaded, -1 if unknown -
ProgressUpdateEvent
Event constructor method to construct a new progress event.
Parameters:
source
- the source of the filereadBytes
- bytes transferredcontentLength
- total size of file currently being uploaded, -1 if unknownfileName
- name of file currently being uploaded
-
-
Method Details
-
getUpload
Upload where the event occurred.
Returns:
the Source of the event
-
getReadBytes
public long getReadBytes()Get bytes transferred for this update.
Returns:
bytes transferred
-
getContentLength
public long getContentLength()Get total file size.
Returns:
total file size or -1 if unknown
-
getFileName
Get the file name.
Returns:
file name
-