Class UHFailedEvent
java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<UploadHelper>
org.vaadin.addons.f0rce.uploadhelper.events.UHFinishedEvent
org.vaadin.addons.f0rce.uploadhelper.events.UHFailedEvent
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
UHNoInputStreamEvent
,UHNoOutputStreamEvent
public class UHFailedEvent extends UHFinishedEvent
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description UHFailedEvent(UploadHelper source, java.lang.String filename, java.lang.String MIMEType, long length)
Create an instance of the event.UHFailedEvent(UploadHelper source, java.lang.String filename, java.lang.String mimeType, long length, java.lang.Exception reason)
Create an instance of the event. -
Method Summary
Modifier and Type Method Description long
getContentLength()
Get the number of uploaded bytes.java.lang.Exception
getReason()
Get the exception that caused the failure.Methods inherited from class org.vaadin.addons.f0rce.uploadhelper.events.UHFinishedEvent
getFileName, getMIMEType, getUpload
-
Constructor Details
-
UHFailedEvent
public UHFailedEvent(UploadHelper source, java.lang.String filename, java.lang.String mimeType, long length, java.lang.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
-
UHFailedEvent
public UHFailedEvent(UploadHelper source, java.lang.String filename, java.lang.String MIMEType, long length)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
public java.lang.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 classUHFinishedEvent
- Returns:
- the number of uploaded bytes
-