Class FinishedEvent

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
FailedEvent, SucceededEvent

public class FinishedEvent extends ComponentEvent<Upload>
FinishedEvent is sent when the upload receives a file, regardless of whether the reception was successful or failed. If you wish to distinguish between the two cases, use either SucceededEvent or FailedEvent, which are both subclasses of the FinishedEvent.
Author:
Vaadin Ltd.
See Also:
  • Constructor Details

    • FinishedEvent

      public FinishedEvent(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 length of the received file
  • Method Details

    • getUpload

      public Upload getUpload()
      Upload where the event occurred.
      Returns:
      the Source of the event
    • getFileName

      public String getFileName()
      Get the file name.
      Returns:
      the file name
    • getMIMEType

      public String getMIMEType()
      Get the MIME Type of the file.
      Returns:
      the MIME type
    • getContentLength

      public long getContentLength()
      Get the length of the file.
      Returns:
      the length