Package com.vaadin.flow.component.upload
Class FailedEvent
java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<Upload>
com.vaadin.flow.component.upload.FinishedEvent
com.vaadin.flow.component.upload.FailedEvent
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
NoInputStreamEvent
,NoOutputStreamEvent
FailedEvent event is sent when the upload is received, but the reception is
interrupted for some reason.
- Author:
- Vaadin Ltd.
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorDescriptionFailedEvent
(Upload source, String filename, String MIMEType, long length) Create an instance of the event.FailedEvent
(Upload source, String filename, String mimeType, long length, Exception reason) Create an instance of the event. -
Method Summary
Modifier and TypeMethodDescriptionlong
Get the number of uploaded bytes.Get the exception that caused the failure.Methods inherited from class com.vaadin.flow.component.upload.FinishedEvent
getFileName, getMIMEType, getUpload
Methods inherited from class com.vaadin.flow.component.ComponentEvent
getSource, isFromClient, unregisterListener
Methods inherited from class java.util.EventObject
toString
-
Constructor Details
-
FailedEvent
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 number of uploaded bytesreason
- exception that failed the upload
-
FailedEvent
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 number of uploaded bytes
-
-
Method Details
-
getReason
Get the exception that caused the failure.- Returns:
- the exception that caused the failure, null if n/a
-
getContentLength
public long getContentLength()Get the number of uploaded bytes.- Overrides:
getContentLength
in classFinishedEvent
- Returns:
- the number of uploaded bytes
-