public interface LicenseProvider
checkout(Feature)
Modifier and Type | Interface and Description |
---|---|
static class |
LicenseProvider.Builder
Builds a license provider.
|
Modifier and Type | Method and Description |
---|---|
void |
checkinAll()
Checks-in all license that were checked-out by this provider.
|
License |
checkout(Feature feature)
Checks-out a license feature.
|
static LicenseProvider.Builder |
forSource(String licenseSource)
Creates a license builder for the given source.
|
LicenseDefinition |
getLicenseDefinition()
Returns the the definition of the underlying license, which enables to lookup available features.
|
boolean |
isDisconnected()
Determines whether this provider is disconnected from the license server.
|
static LicenseProvider.Builder forSource(String licenseSource)
The license source can either be:
c:\license\myLicenses.lic
@myLicenseServer.myDomain.com
)licenseSource
- the license source.boolean isDisconnected()
true
if provider is disconnected from license server, false
otheriwse.LicenseDefinition getLicenseDefinition() throws LicenseException
LicenseException
- if the definition cannot be retrieved.License checkout(Feature feature) throws LicenseException
Once a license feature is checked-out using this provider, calling this method again for the same feature will reuse the already consumed license.
If two instances of an application are running on the same host for the same user,
each application is going to consume a token in case of a floating license.
If second application instance should rather reuse the token already consumed by first application,
the builder that creates this license provider should be configured with ignoreDuplicateCheckoutOnServer(true)
.
feature
- the feature to checkout.LicenseException
- if the check-out fails.LicenseProvider.Builder.ignoreDuplicateCheckoutOnServer(boolean)
void checkinAll() throws LicenseException
LicenseException
- for the first license for which the check-in fails.