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
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 Description FailedEvent(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
All Methods Modifier and Type Method Description long
getContentLength()
Get the number of uploaded bytes.
Exception
getReason()
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 Detail
-
FailedEvent
public FailedEvent(Upload source, String filename, String mimeType, long length, Exception reason)
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
-
-
Method Detail
-
getReason
public Exception 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
-
-