Class StartDownloadCallback.Action

java.lang.Object
com.teamdev.jxbrowser.callback.AsyncCallbackAction<com.teamdev.jxbrowser.download.internal.rpc.StartDownload.Response>
com.teamdev.jxbrowser.browser.callback.StartDownloadCallback.Action
Enclosing interface:
StartDownloadCallback

public static final class StartDownloadCallback.Action extends AsyncCallbackAction<com.teamdev.jxbrowser.download.internal.rpc.StartDownload.Response>
An action providing a response to the StartDownloadCallback.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Action(Consumer<com.teamdev.jxbrowser.download.internal.rpc.StartDownload.Response> consumer)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Notifies the engine that the file download should be canceled.
    void
    download(Path destFilePath)
    Notifies the engine that the file should be downloaded into the given target path.

    Methods inherited from class com.teamdev.jxbrowser.callback.AsyncCallbackAction

    isClosed

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Action

      public Action(Consumer<com.teamdev.jxbrowser.download.internal.rpc.StartDownload.Response> consumer)
  • Method Details

    • download

      public void download(Path destFilePath)
      Notifies the engine that the file should be downloaded into the given target path.
      Parameters:
      destFilePath - the absolute or relative path to the target file. The engine must have the write permissions on the target file
    • cancel

      public void cancel()
      Notifies the engine that the file download should be canceled.