Class WSFileDownload

java.lang.Object
com.iizix.server.wsfile.WSFileDownload
All Implemented Interfaces:
IWSFileDownload

public final class WSFileDownload extends Object implements IWSFileDownload
Class used to hold information for file download into a file provider.
Author:
Christopher Mindus
  • Method Details

    • getURL

      public URL getURL()
      Gets the URL.
      Specified by:
      getURL in interface IWSFileDownload
      Returns:
      The URL.
    • getID

      public Object getID()
      Gets the ID used for database identification.
      Specified by:
      getID in interface IWSFileDownload
      Returns:
      A Long or String, null when database is not used.
    • getDescription

      public String getDescription()
      Gets the description of the download file.
      Specified by:
      getDescription in interface IWSFileDownload
      Returns:
      The description.
    • dispose

      public void dispose()
      Disposes of the download if in progress.
      Specified by:
      dispose in interface IWSFileDownload
    • isDisposed

      public boolean isDisposed()
      Checks if the download is disposed of (during progress).
      Specified by:
      isDisposed in interface IWSFileDownload
      Returns:
      The dispose flag: true if download has been disposed of, i.e. canceled, false otherwise.
    • getFile

      public File getFile()
      Gets the download file.
      Specified by:
      getFile in interface IWSFileDownload
      Returns:
      The file, or null if an exception occurred.
    • getException

      public Throwable getException()
      Gets the exception from the download process or when writing the file.
      Specified by:
      getException in interface IWSFileDownload
      Returns:
      The exception, or null if no error occurred.
    • toString

      public String toString()
      Returns a string representation of the file download instance.
      Overrides:
      toString in class Object
      Returns:
      A string formatted as className[url=URL,description=descr,...].