Class PolymartLicenseChecker
java.lang.Object
me.hsgamer.hscore.license.polymart.PolymartLicenseChecker
- All Implemented Interfaces:
LicenseChecker
The license checker for Polymart
-
Constructor Summary
ConstructorsConstructorDescriptionPolymartLicenseChecker(String resource, boolean isPaid, boolean isDeepCheck) Create a new license checker with the default fetcherPolymartLicenseChecker(String resource, boolean isPaid, boolean isDeepCheck, PolymartLicenseFetcher fetcher) Create a new license checker -
Method Summary
Modifier and TypeMethodDescriptionCheck the licensegetUrl()Get the URL of the platform this checker refers tobooleanCheck if the checker is availablesetExceptionHandler(Consumer<Throwable> exceptionHandler) Set the exception handler
-
Constructor Details
-
PolymartLicenseChecker
public PolymartLicenseChecker(String resource, boolean isPaid, boolean isDeepCheck, PolymartLicenseFetcher fetcher) Create a new license checker- Parameters:
resource- the resource idisPaid- whether the resource is paidisDeepCheck- whether the checker should check the license deeply using Polymart APIfetcher- the license fetcher
-
PolymartLicenseChecker
Create a new license checker with the default fetcher- Parameters:
resource- the resource idisPaid- whether the resource is paidisDeepCheck- whether the checker should check the license deeply using Polymart API
-
-
Method Details
-
setExceptionHandler
Set the exception handler- Parameters:
exceptionHandler- the exception handler
-
isAvailable
public boolean isAvailable()Description copied from interface:LicenseCheckerCheck if the checker is available- Specified by:
isAvailablein interfaceLicenseChecker- Returns:
- true if it's available
-
checkLicense
Description copied from interface:LicenseCheckerCheck the license- Specified by:
checkLicensein interfaceLicenseChecker- Returns:
- the result
-
getUrl
Description copied from interface:LicenseCheckerGet the URL of the platform this checker refers to- Specified by:
getUrlin interfaceLicenseChecker- Returns:
- the URL
-