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

    Methods inherited from class com.vaadin.flow.component.ComponentEvent

    getSource, isFromClient, unregisterListener

    Methods inherited from class java.util.EventObject

    toString

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 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 file
      filename - the received file name
      mimeType - the MIME type of the received file
      length - the number of uploaded bytes
      reason - 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 file
      filename - the received file name
      MIMEType - the MIME type of the received file
      length - 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 class UHFinishedEvent
      Returns:
      the number of uploaded bytes