Class FailedEvent

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
NoInputStreamEvent, NoOutputStreamEvent

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:
  • Constructor Details

    • 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 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
    • FailedEvent

      public FailedEvent(Upload source, String filename, 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 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 FinishedEvent
      Returns:
      the number of uploaded bytes