Package com.vaadin.flow.component.upload
Class FinishedEvent
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
FailedEvent
,SucceededEvent
FinishedEvent is sent when the upload receives a file, regardless of whether
the reception was successful or failed. If you wish to distinguish between
the two cases, use either SucceededEvent or FailedEvent, which are both
subclasses of the FinishedEvent.
- Author:
- Vaadin Ltd.
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorDescriptionFinishedEvent
(Upload source, String fileName, String mimeType, long length) Create an instance of the event. -
Method Summary
Modifier and TypeMethodDescriptionlong
Get the length of the file.Get the file name.Get the MIME Type of the file.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
-
FinishedEvent
Create an instance of the event.- Parameters:
source
- the source of the filefileName
- the received file namemimeType
- the MIME type of the received filelength
- the length of the received file
-
-
Method Details
-
getUpload
Upload where the event occurred.- Returns:
- the Source of the event
-
getFileName
Get the file name.- Returns:
- the file name
-
getMIMEType
Get the MIME Type of the file.- Returns:
- the MIME type
-
getContentLength
public long getContentLength()Get the length of the file.- Returns:
- the length
-