Class LicenseChecker.DownloadOptions

java.lang.Object
com.vaadin.pro.licensechecker.LicenseChecker.DownloadOptions
Enclosing class:
LicenseChecker

public static class LicenseChecker.DownloadOptions extends Object
Options for downloading a license key.
  • Constructor Details

    • DownloadOptions

      public DownloadOptions(Product source)
      Creates download options with the specified source product.
      Parameters:
      source - the product that triggered the download (who is requesting the license)
      Throws:
      IllegalArgumentException - if source is null
    • DownloadOptions

      public DownloadOptions(Product source, int timeoutSeconds)
      Creates download options with a custom timeout.
      Parameters:
      source - the product that triggered the download (who is requesting the license)
      timeoutSeconds - timeout in seconds to wait for user to complete authentication
      Throws:
      IllegalArgumentException - if source is null or timeoutSeconds is less than or equal to 0
    • DownloadOptions

      public DownloadOptions(Product source, int timeoutSeconds, Consumer<String> urlHandler)
      Creates download options with a custom URL handler.
      Parameters:
      source - the product that triggered the download (who is requesting the license)
      timeoutSeconds - timeout in seconds to wait for user to complete authentication
      urlHandler - custom handler for opening the authentication URL (for testing or custom browser behavior), or null to use the default system browser handler
      Throws:
      IllegalArgumentException - if source is null or timeoutSeconds is less than or equal to 0
  • Method Details

    • getSource

      public Product getSource()
      Gets the product that triggered the download.
      Returns:
      the source product
    • getTimeoutSeconds

      public int getTimeoutSeconds()
      Gets the timeout in seconds.
      Returns:
      the timeout in seconds
    • getUrlHandler

      public Consumer<String> getUrlHandler()
      Gets the URL handler.
      Returns:
      the URL handler