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:
Direct Known Subclasses:
public class FailedEvent extends FinishedEvent
Upload.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
Constructors Constructor and Description FailedEvent(Upload source, String filename, String MIMEType, long length)
FailedEvent(Upload source, String filename, String MIMEType, long length, Exception reason)
-
Method Summary
All Methods Modifier and Type Method and Description long
getContentLength()
Gets the number of uploaded bytes.
Exception
getReason()
Gets 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 Detail
-
FailedEvent
public FailedEvent(Upload source, String filename, String MIMEType, long length, Exception reason)
Parameters:
source
- the source of the file.filename
- the received file name.MIMEType
- the MIME type of the received file.length
- the number of uploaded bytesreason
- exception that failed the upload
-
-
Method Detail
-
getReason
public Exception getReason()
Gets the exception that caused the failure.
Returns:
the exception that caused the failure, null if n/a
-
getContentLength
public long getContentLength()
Gets the number of uploaded bytes.
Overrides:
getContentLength
in classFinishedEvent
Returns:
the number of uploaded bytes
-
-