Package com.vaadin.pro.licensechecker
Class LicenseChecker.DownloadOptions
java.lang.Object
com.vaadin.pro.licensechecker.LicenseChecker.DownloadOptions
- Enclosing class:
- LicenseChecker
Options for downloading a license key.
-
Constructor Summary
ConstructorsConstructorDescriptionDownloadOptions(Product source) Creates download options with the specified source product.DownloadOptions(Product source, int timeoutSeconds) Creates download options with a custom timeout.DownloadOptions(Product source, int timeoutSeconds, Consumer<String> urlHandler) Creates download options with a custom URL handler. -
Method Summary
Modifier and TypeMethodDescriptionGets the product that triggered the download.intGets the timeout in seconds.Gets the URL handler.
-
Constructor Details
-
DownloadOptions
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
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
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 authenticationurlHandler- 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
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
Gets the URL handler.- Returns:
- the URL handler
-