@Immutable public abstract class BasicLicenseManagementContext extends Object implements LicenseManagementContext
Unless stated otherwise, all no-argument methods need to return consistent objects so that caching them is not required. A returned object is considered to be consistent if it compares equal or at least behaves identical to any previously returned object.
| Modifier | Constructor and Description |
|---|---|
protected |
BasicLicenseManagementContext(String subject) |
| Modifier and Type | Method and Description |
|---|---|
Authentication |
authentication(KeyStoreParameters parameters)
Returns an authentication for the given key store parameters.
|
LicenseAuthorization |
authorization()
Returns the license authorization.
|
long |
cachePeriodMillis()
Returns the cache period for some intermediate results in milliseconds.
|
ClassLoader |
classLoader()
Returns a class loader or
null if the system class loader
shall get used to load classes and resources. |
LicenseConsumerContext |
consumer()
Returns a context for license consumer applications.
|
LicenseInitialization |
initialization()
Returns the license initialization.
|
Date |
now()
Returns the current date/time.
|
PasswordPolicy |
policy()
Returns the password policy.
|
abstract Repository |
repository()
Returns a new repository to use for
licenses.
|
String |
subject()
Returns the licensing subject.
|
LicenseValidation |
validation()
Returns the license validation.
|
LicenseVendorContext |
vendor()
Returns a context for license vendor applications alias license key
generators.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitencryption, license, pbeAlgorithm, storeTypecodeccompressionprotected BasicLicenseManagementContext(String subject)
public Authentication authentication(KeyStoreParameters parameters)
The implementation in the class BasicLicenseManagementContext
returns a new Notary for the given key store parameters.
authentication in interface LicenseManagementContextparameters - the key store parameters.public LicenseAuthorization authorization()
The implementation in the class BasicLicenseManagementContext
returns an authorization which clears all operation requests.
authorization in interface LicenseAuthorizationProviderpublic long cachePeriodMillis()
Long.MAX_VALUE to disable the timeout or zero to disable
the caching of intermediate results.
The implementation in the class BasicLicenseManagementContext
returns half an hour (in milliseconds) to account for external changes
to the configured store for the license key.
cachePeriodMillis in interface CachePeriodProvider@CheckForNull public ClassLoader classLoader()
null if the system class loader
shall get used to load classes and resources.
The implementation in the class BasicLicenseManagementContext
returns the current thread's context class loader.
classLoader in interface ClassLoaderProviderpublic final LicenseConsumerContext consumer()
LicenseManagementContextconsumer in interface LicenseManagementContextpublic LicenseInitialization initialization()
The implementation in the class BasicLicenseManagementContext
returns an initialization which initializes the license
consumer type,
holder,
issue date/time,
issuer and
subject
unless these properties are already set respectively.
initialization in interface LicenseInitializationProviderpublic Date now()
Date.
However, in order to protect against date/time forgery, a more
sophisticated implementation should use an authoritative time source,
e.g. a radio clock, an Internet time server or extrapolate an
approximation from timestamps in input data.
If resolving the current date/time from an authoritative resource fails
for any reason, the implementation should simply fallback to return a
new Date.
The implementation in the class BasicLicenseManagementContext
returns a new Date.
public PasswordPolicy policy()
The implementation in the class BasicLicenseManagementContext
returns a new PasswordPolicy.
policy in interface PasswordPolicyProviderpublic abstract Repository repository()
repository in interface RepositoryProviderpublic final String subject()
subject in interface LicenseSubjectProviderpublic LicenseValidation validation()
The implementation in the class BasicLicenseManagementContext
returns a validation which validates the license
consumer amount,
consumer type,
holder,
issue date/time,
issuer,
subject,
not after date/time (if set) and
not before date/time (if set).
validation in interface LicenseValidationProviderpublic final LicenseVendorContext vendor()
LicenseManagementContextvendor in interface LicenseManagementContextCopyright © 2005–2017 Schlichtherle IT Services. All rights reserved.