|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vs.ezlicrun.EzLicenseInfo
The class manages the state of the information pertaining to
a license key and provides a method to check a license key.
How to use for checking a license key in an ISV product:
1. Instantiate this class:
info = new EzLicenseInfo();
2. Check the license key:
int warningBitmap = info.checkLicenseKey(
licenseKey, etc.);
3. If no exception, the key is good, and the accessors
for the class can be invoked to obtain the decomposed
info such as quota limit, expiration date, concurrent-user
limit, etc.
4. If the returned warning bit map is non-zero, appropriate
warning messages / alerts may be issued by the ISV
application to the end user informing them of impending
expirations, quota exhaustion, etc.
Changes for 2.0:
1. If OS enforcement: user / host / net arg is optional
2. Windows: OS enforcement is based on case-insensitive
comparison.
3. Custom key handler is invoked after entire key is
assembled.
4. Allow for small (6-hr) timestamp discrepancies when
checking system clock.
5. System-clock-change-check: hard-enforce w/ file in
user home dir.
6. Expiration dates: base on absolute timestamps.
7. Custom key handler: invoked irrespective of existence
of custom key value.
8. Context initialization for factory methods.
New in 2.0:
1. Additional key content: key version, application password
2. Private-key-encrypted custom key and cookie if application
password specified.
3. Application password public key argument for check API calls.
4. Visible additional key content: key version.
5. Automatic, secure application state management in key cookie
using secure API extensions. Quota consumption is built-in,
and in addition the application can store and update arbitrary
application-managed state in the key cookie.
6. Optional disabling of system clock checking for perpetual
keys (enabled by default). If enabled, or if a key is time
limited, a cross-check is made against a hidden file and
(for the secure API's) the key cookie's timestamp. This
applies to all flavors of license key checking API calls.
7. Optional hidden-file location specification. By default,
the hidden file is located at the current directory (".").
New in 2.5:
1. Additional license checking API call signatures accepting a
"strict" password check, which if set forces a password check.
2. Library version and status message introspection functions
3. Changed semantics for disabling of system clock checking to
encompass time-limited licenses as well.
4. Added API call to set time tolerance.
5. Hidden file directory specification can specify an explicit
file name ending in ".ehf".
6. Atomic hidden file update mgmt to protect from file corruption due
to crash / concurrency conflict.
Nested Class Summary | |
static class |
EzLicenseInfo.Hfile
|
static class |
EzLicenseInfo.Util
|
Field Summary | |
static int |
EZLIC_DEFAULT_TIME_TOLERANCE_HRS
Default time tolerance in hours |
static int |
EZLIC_KEY_VSN
Previous key version |
static int |
EZLIC_KEY_VSN_CURR
Current new-feature key version |
static int |
EZLIC_KEY_VSN_NEXT
Future key version |
static int |
EZLIC_MODE_CUSTOM_COOKIE
Custom cookie |
static int |
EZLIC_MODE_CUSTOM_KEY
Custom key |
static int |
EZLIC_MODE_METERED
Metered |
static int |
EZLIC_MODE_OPTIONS
Option-enabling |
static int |
EZLIC_MODE_TIME
Time limited |
static int |
EZLIC_MODEL_SERVER
Server license model |
static int |
EZLIC_MODEL_USER
Single-user license model |
static int |
EZLIC_TYPE_SVR_CONC
Concurrent user |
static int |
EZLIC_TYPE_SVR_CPU
CPU count |
static int |
EZLIC_TYPE_SVR_MHZ
CPU MHZ |
static int |
EZLIC_TYPE_SVR_NMU
Named-user |
static int |
EZLIC_TYPE_U_FLOAT
Floating |
static int |
EZLIC_TYPE_U_NODE
Node-locked |
static int |
EZLIC_TYPE_U_USER
User-locked |
static int |
EZLM_MAJOR_VERSION_NUMBER
Runtime library normalized major version number |
static int |
EZLM_MINOR_VERSION_NUMBER
Runtime library normalized minor version number |
Constructor Summary | |
EzLicenseInfo()
|
Method Summary | |
int |
checkLicenseKey(java.lang.String licenseKey,
EzLicCustomLicenseInterface customKeyHandler,
java.lang.Object customKeyContext,
int daysLeftThreshold,
long quotaUsageToDate,
long quotaThreshold,
int daysGracePeriod,
long quotaGrace,
java.lang.String userHostNet,
long currUsageValue)
(Full version, no application password:) Check the specified license key against the provided info for key violations, and sets the class context based on the key. |
int |
checkLicenseKey(java.lang.String licenseKey,
EzLicCustomLicenseInterface customKeyHandler,
java.lang.Object customKeyContext,
int daysLeftThreshold,
long quotaUsageToDate,
long quotaThreshold,
int daysGracePeriod,
long quotaGrace,
java.lang.String userHostNet,
long currUsageValue,
java.lang.String product,
java.lang.String appPassword)
(Full version with application password check for access-controlled keys, but no hidden-timestamp-file control:) Check the specified license key against the provided info for key violations, and sets the class context based on the key. |
int |
checkLicenseKey(java.lang.String licenseKey,
EzLicCustomLicenseInterface customKeyHandler,
java.lang.Object customKeyContext,
int daysLeftThreshold,
long quotaUsageToDate,
long quotaThreshold,
int daysGracePeriod,
long quotaGrace,
java.lang.String userHostNet,
long currUsageValue,
java.lang.String product,
java.lang.String appPassword,
boolean strictPwdCheck)
(Full version with application password check for access-controlled keys, but no hidden-timestamp-file control and strict password check:) Check the specified license key against the provided info for key violations, and sets the class context based on the key. |
int |
checkLicenseKey(java.lang.String licenseKey,
EzLicCustomLicenseInterface customKeyHandler,
java.lang.Object customKeyContext,
int daysLeftThreshold,
long quotaUsageToDate,
long quotaThreshold,
int daysGracePeriod,
long quotaGrace,
java.lang.String userHostNet,
long currUsageValue,
java.lang.String product,
java.lang.String appPassword,
java.lang.String hfileDirectory,
boolean alwaysCheckTimestamp)
(Full version with application password check for access-controlled keys, with hidden-file-timestamp-check control:) Check the specified license key against the provided info for key violations, and sets the class context based on the key. |
int |
checkLicenseKey(java.lang.String licenseKey,
EzLicCustomLicenseInterface customKeyHandler,
java.lang.Object customKeyContext,
int daysLeftThreshold,
long quotaUsageToDate,
long quotaThreshold,
int daysGracePeriod,
long quotaGrace,
java.lang.String userHostNet,
long currUsageValue,
java.lang.String product,
java.lang.String appPassword,
java.lang.String hfileDirectory,
boolean alwaysCheckTimestamp,
boolean strictPwdCheck)
(Full version with application password check for access-controlled keys, with hidden-file-timestamp-check control:) Check the specified license key against the provided info for key violations, and sets the class context based on the key. |
java.lang.String |
checkLicenseKeySecure(java.lang.String licenseKey,
java.lang.String keyCookie,
EzLicExceptionBase customException,
EzLicCustomLicenseInterface customKeyHandler,
java.lang.Object customKeyContext,
int daysLeftThreshold,
long quotaUsageToDate,
long quotaThreshold,
int daysGracePeriod,
long quotaGrace,
java.lang.String userHostNet,
long currUsageValue)
(Basic secure version:) Check the specified license key against the provided info for key violations, and set the class context based on the key. |
java.lang.String |
checkLicenseKeySecure(java.lang.String licenseKey,
java.lang.String keyCookie,
EzLicExceptionBase customException,
EzLicCustomLicenseInterface customKeyHandler,
java.lang.Object customKeyContext,
int daysLeftThreshold,
long quotaUsageToDate,
long quotaThreshold,
int daysGracePeriod,
long quotaGrace,
java.lang.String userHostNet,
long currUsageValue,
java.lang.String product,
java.lang.String appPassword,
java.lang.String appState)
(Full secure version w/o hidden-file-timestamp check control:) Check the specified license key against the provided info for key violations, and set the class context based on the key. |
java.lang.String |
checkLicenseKeySecure(java.lang.String licenseKey,
java.lang.String keyCookie,
EzLicExceptionBase customException,
EzLicCustomLicenseInterface customKeyHandler,
java.lang.Object customKeyContext,
int daysLeftThreshold,
long quotaUsageToDate,
long quotaThreshold,
int daysGracePeriod,
long quotaGrace,
java.lang.String userHostNet,
long currUsageValue,
java.lang.String product,
java.lang.String appPassword,
java.lang.String appState,
boolean strictPwdCheck)
(Full secure version w/o hidden-file-timestamp check control with strict password check:) Check the specified license key against the provided info for key violations, and set the class context based on the key. |
java.lang.String |
checkLicenseKeySecure(java.lang.String licenseKey,
java.lang.String keyCookie,
EzLicExceptionBase customException,
EzLicCustomLicenseInterface customKeyHandler,
java.lang.Object customKeyContext,
int daysLeftThreshold,
long quotaUsageToDate,
long quotaThreshold,
int daysGracePeriod,
long quotaGrace,
java.lang.String userHostNet,
long currUsageValue,
java.lang.String product,
java.lang.String appPassword,
java.lang.String appState,
java.lang.String hfileDirectory,
boolean alwaysCheckTimestamp)
(Full secure version with hidden-file-timestamp check control:) Check the specified license key against the provided info for key violations, and set the class context based on the key. |
java.lang.String |
checkLicenseKeySecure(java.lang.String licenseKey,
java.lang.String keyCookie,
EzLicExceptionBase customException,
EzLicCustomLicenseInterface customKeyHandler,
java.lang.Object customKeyContext,
int daysLeftThreshold,
long quotaUsageToDate,
long quotaThreshold,
int daysGracePeriod,
long quotaGrace,
java.lang.String userHostNet,
long currUsageValue,
java.lang.String product,
java.lang.String appPassword,
java.lang.String appState,
java.lang.String hfileDirectory,
boolean alwaysCheckTimestamp,
boolean strictPwdCheck)
(Full secure version with hidden-file-timestamp check control and strict passpowd check:) Check the specified license key against the provided info for key violations, and set the class context based on the key. |
int |
checkMultiUserLicenseKeyBasic(java.lang.String licenseKey,
int daysLeftThreshold,
long quotaUsageToDate,
long quotaThreshold,
int daysGracePeriod,
long quotaGrace,
java.lang.String hostNetName,
long currUsageValue)
(Basic multi-user license check w/ no access control check, for backward compatibility:) Check the specified license key against the provided info for key violations, and sets the class context based on the key. |
int |
checkMultiUserLicenseKeyBasic(java.lang.String licenseKey,
int daysLeftThreshold,
long quotaUsageToDate,
long quotaThreshold,
int daysGracePeriod,
long quotaGrace,
java.lang.String hostNetName,
long currUsageValue,
java.lang.String product,
java.lang.String appPassword)
(Basic multi-user license check w/ access control check:) Check the specified license key against the provided info for key violations, and sets the class context based on the key. |
int |
checkMultiUserLicenseKeyBasic(java.lang.String licenseKey,
int daysLeftThreshold,
long quotaUsageToDate,
long quotaThreshold,
int daysGracePeriod,
long quotaGrace,
java.lang.String hostNetName,
long currUsageValue,
java.lang.String product,
java.lang.String appPassword,
boolean strictPwdCheck)
(Basic multi-user license check w/ access control check and strict password check:) Check the specified license key against the provided info for key violations, and sets the class context based on the key. |
int |
checkSingleUserLicenseKeyBasic(java.lang.String licenseKey,
int daysLeftThreshold,
long quotaUsageToDate,
long quotaThreshold,
int daysGracePeriod,
long quotaGrace,
java.lang.String userHostName)
(Basic single-user license check w/ no access-control check, for backward compatibility:) Check the specified license key against the provided info for key violations, and sets the class context based on the key. |
int |
checkSingleUserLicenseKeyBasic(java.lang.String licenseKey,
int daysLeftThreshold,
long quotaUsageToDate,
long quotaThreshold,
int daysGracePeriod,
long quotaGrace,
java.lang.String userHostName,
java.lang.String product,
java.lang.String appPassword)
(Basic single-user license check w/ access-control check:) Check the specified license key against the provided info for key violations, and sets the class context based on the key. |
int |
checkSingleUserLicenseKeyBasic(java.lang.String licenseKey,
int daysLeftThreshold,
long quotaUsageToDate,
long quotaThreshold,
int daysGracePeriod,
long quotaGrace,
java.lang.String userHostName,
java.lang.String product,
java.lang.String appPassword,
boolean strictPwdCheck)
(Basic single-user license check w/ access-control check and strict password check:) Check the specified license key against the provided info for key violations, and sets the class context based on the key. |
static boolean |
cleanupKeyCookie(java.lang.String keyCookie,
java.lang.String productName,
java.lang.String appPassword)
Clean up persistent structures associated with key cookie. |
static boolean |
cleanupKeyCookie(java.lang.String keyCookie,
java.lang.String productName,
java.lang.String appPassword,
java.lang.String hfileDirectory,
boolean check)
(hidden-file-timestamp-check-control version): Clean up persistent structures associated with key cookie. |
static java.lang.String |
createKeyCookieSeed(java.lang.String productName)
createKeyCookieSeed: Create a key cookie seed that is the first key cookie passed into the "checkLicenseKeySecure" API call by an application. |
static java.lang.String |
createKeyCookieSeed(java.lang.String productName,
java.lang.String appPassword,
java.lang.String appState,
boolean check)
createKeyCookieSeed: Create a key cookie seed that is the first key cookie passed into the "checkLicenseKeySecure" API call by an application based on an application password, and specifying an application-managed state to be maintained securely in the key cookie. |
static java.lang.String |
createKeyCookieSeed(java.lang.String productName,
java.lang.String appPassword,
java.lang.String appState,
boolean check,
java.lang.String hfileDirectory)
createKeyCookieSeed (controlled-hidden-file-location version): Create a key cookie seed that is the first key cookie passed into the "checkLicenseKeySecure" API call by an application based on an application password, and specifying an application-managed state to be maintained securely in the key cookie. |
java.lang.String |
getAppPwd()
FOR INTERNAL USE ONLY |
java.lang.String |
getChainedKeyId()
getChainedKeyId: returns chained key id, null if none. |
java.lang.String |
getCustomCookie()
getCustomCookie: returns custom cookie contained in the license key, null if none |
java.lang.String |
getCustomKey()
getCustomKey: returns custom key contained in the license key, null if none |
boolean |
getEnforce()
getEnforce: returns whether user / host name check is enforced |
java.util.Date |
getExpirationDate()
getExpirationDate: returns expiration date, null if none |
long |
getExpirationTs()
getExpirationTs: returns expiration timestamp, 0 if none. |
static java.lang.String[] |
getEzlmVersionInfo()
Get version information string |
static java.lang.String |
getKeyCookieAppState(java.lang.String keyCookie,
java.lang.String productName,
java.lang.String appPassword)
Get application state stored in key cookie. |
static long |
getKeyCookieQuotaToDate(java.lang.String keyCookie,
java.lang.String productName,
java.lang.String appPassword)
Get quota-to-date stored in key cookie. |
static long |
getKeyCookieTs(java.lang.String keyCookie,
java.lang.String productName,
java.lang.String appPassword)
Get last-update timestamp stored in key cookie. |
int |
getKeyVersion()
getKeyVersion: returns 2-digit key version. |
java.lang.String |
getLicenseKey()
getLicenseKey: returns license key |
int |
getLicenseModeBitmap()
getLicenseModeBitmap: returns license mode bitmap, bits set per EZLIC_MODE_*. |
int |
getLicenseModelCode()
getLicenseModelCode: returns license model code |
int |
getLicenseTypeCode()
getLicenseTypeCode: returns license type code |
java.lang.String |
getOptions()
getOptions: returns options string, null if none |
long |
getQuotaValue()
getQuotaValue: returns quota limit value, -1 if no quota limit. |
static int |
getTimeToleranceHrs()
Get the current setting for the time tolerance. |
long |
getUsageValue()
getUsageValue: returns usage limit value (cpu / CPU MHZ etc.) for the license key, -1 if no limit. |
java.lang.String |
getUserHostNetName()
getUserOrHostName: returns user / host name, null if none |
int |
getWarningsBitmap()
getWarningsBitmap: returns warning bitmap for license key |
void |
setCustomCookie(java.lang.String customCookie)
setCustomCookie: sets custom cookie value N/A during run time license key check |
void |
setCustomKey(java.lang.String customKey)
setCustomKey: sets custom key value N/A during run time license key check |
void |
setEnforce(boolean enforce)
setEnforce: sets user / host enforcement policy N/A during run time license key check |
void |
setExpirationDate(java.util.Date expirationDate)
setExpirationDate: sets license expiration date N/A during run time license key check |
void |
setKeyVersion(int keyVsn)
setKeyVersion: sets key version value N/A during run time license key check |
void |
setLicenseKey(java.lang.String licenseKey)
setLicenseKey: sets license key N/A during run time license key check |
void |
setLicenseModeBitmap(int licenseModeBitmap)
setLicenseModeBitmap: sets license mode bitmap N/A during run time license key check |
void |
setLicenseModelCode(int licenseModelCode)
setLicenseModelCode: sets license model code N/A during run time license key check |
void |
setLicenseTypeCode(int licenseTypeCode)
setLicenseTypeCode: sets license type code N/A during run time license key check |
void |
setOptions(java.lang.String options)
setOptions: sets options string N/A during run time license key check |
void |
setQuotaValue(long quotaValue)
setQuotaValue: sets usage quota value N/A during run time license key check |
static void |
setTimeToleranceHrs(int tolerance)
Set the time tolerance for system clock checking. |
void |
setUsageValue(long usageValue)
setUsageValue: sets value for usage limit N/A during run time license key check |
void |
setUserHostNetName(java.lang.String userHostNetName)
setUserHostNetName: sets user / host / network name according to context N/A during run time license key check |
void |
setWarningsBitmap(int warningsBitmap)
setWarningsBitmap: sets warning bitmap N/A during run time license key check |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int EZLM_MAJOR_VERSION_NUMBER
public static final int EZLM_MINOR_VERSION_NUMBER
public static final int EZLIC_KEY_VSN
public static final int EZLIC_KEY_VSN_CURR
public static final int EZLIC_KEY_VSN_NEXT
public static final int EZLIC_MODEL_USER
public static final int EZLIC_MODEL_SERVER
public static final int EZLIC_TYPE_U_USER
public static final int EZLIC_TYPE_U_NODE
public static final int EZLIC_TYPE_U_FLOAT
public static final int EZLIC_TYPE_SVR_CONC
public static final int EZLIC_TYPE_SVR_CPU
public static final int EZLIC_TYPE_SVR_MHZ
public static final int EZLIC_TYPE_SVR_NMU
public static final int EZLIC_MODE_TIME
public static final int EZLIC_MODE_METERED
public static final int EZLIC_MODE_OPTIONS
public static final int EZLIC_MODE_CUSTOM_KEY
public static final int EZLIC_MODE_CUSTOM_COOKIE
public static final int EZLIC_DEFAULT_TIME_TOLERANCE_HRS
Constructor Detail |
public EzLicenseInfo()
Method Detail |
public static java.lang.String[] getEzlmVersionInfo()
public static void setTimeToleranceHrs(int tolerance)
tolerance
- # of hrs of clock drift to tolerate. -1 implies
system clock checking is nullified, and any discrepancy is allowed.public static int getTimeToleranceHrs()
public java.lang.String getLicenseKey()
public int getLicenseModelCode()
public int getLicenseTypeCode()
public int getLicenseModeBitmap()
public java.lang.String getCustomKey()
public java.lang.String getCustomCookie()
public java.lang.String getUserHostNetName()
public java.util.Date getExpirationDate()
public long getExpirationTs()
public java.lang.String getOptions()
public boolean getEnforce()
public long getQuotaValue()
public long getUsageValue()
public int getWarningsBitmap()
public int getKeyVersion()
public java.lang.String getAppPwd()
public java.lang.String getChainedKeyId()
public void setLicenseKey(java.lang.String licenseKey)
licenseKey
- the license keypublic void setLicenseModelCode(int licenseModelCode)
licenseModelCode
- license model code for the license keypublic void setLicenseTypeCode(int licenseTypeCode)
licenseTypeCode
- license type code for the license keypublic void setLicenseModeBitmap(int licenseModeBitmap)
licenseModeBitmap
- license mode bitmap for the license keypublic void setCustomKey(java.lang.String customKey)
customKey
- custom key for the license keypublic void setCustomCookie(java.lang.String customCookie)
customCookie
- custom cookie for the license keypublic void setUserHostNetName(java.lang.String userHostNetName)
userHostNetName
- user / host / network namepublic void setExpirationDate(java.util.Date expirationDate)
expirationDate
- license key expiration datepublic void setOptions(java.lang.String options)
options
- String representing optionspublic void setEnforce(boolean enforce)
enforce
- user / host enforcement policypublic void setQuotaValue(long quotaValue)
quotaValue
- value for usage quotapublic void setUsageValue(long usageValue)
usageValue
- usage limit value.public void setWarningsBitmap(int warningsBitmap)
warningsBitmap
- warning bitmappublic void setKeyVersion(int keyVsn)
keyVsn
- value for key versionpublic static java.lang.String createKeyCookieSeed(java.lang.String productName)
productName
- the product name corresponding to the key
public static java.lang.String createKeyCookieSeed(java.lang.String productName, java.lang.String appPassword, java.lang.String appState, boolean check) throws EzLicExceptionBase
productName
- the product name corresponding to the keyappPassword
- application password - same as what's passed
into the license key check API call.appState
- arbitrary stringified initial application statecheck
- check whether the system clock or its checking mechanism has been tampered with
EzLicExceptionBase
- or a subclass if an error condition is encountered.public static java.lang.String createKeyCookieSeed(java.lang.String productName, java.lang.String appPassword, java.lang.String appState, boolean check, java.lang.String hfileDirectory) throws EzLicExceptionBase
productName
- the product name corresponding to the keyappPassword
- application password - same as what's passed
into the license key check API call.appState
- arbitrary stringified initial application statecheck
- check whether the system clock or its checking mechanism has been tampered withhfileDirectory
- directory in which the hidden file is to be located.
EzLicExceptionBase
- or a subclass if an error condition is encountered.public static boolean cleanupKeyCookie(java.lang.String keyCookie, java.lang.String productName, java.lang.String appPassword) throws EzLicExceptionBase
keyCookie
- last-valid key cookieproductName
- product nameappPassword
- application password, same as that specified
to checkLicenseKeySecure() and createKeyCookieSeed().
EzLicExceptionBase
- or a subclass if an error condition is encountered.public static boolean cleanupKeyCookie(java.lang.String keyCookie, java.lang.String productName, java.lang.String appPassword, java.lang.String hfileDirectory, boolean check) throws EzLicExceptionBase
keyCookie
- last-valid key cookieproductName
- product nameappPassword
- application password, same as that specified
to checkLicenseKeySecure() and createKeyCookieSeed().hfileDirectory
- directory where hidden file is supposed to becheck
- whether to do a timestamp check
EzLicExceptionBase
- or a subclass if an error condition is encountered.public static java.lang.String getKeyCookieAppState(java.lang.String keyCookie, java.lang.String productName, java.lang.String appPassword) throws EzLicExceptionBase
keyCookie
- last-valid key cookieproductName
- product nameappPassword
- application password, same as that specified
to checkLicenseKeySecure() and createKeyCookieSeed().
EzLicExceptionBase
- or a subclass if an error condition is encountered.public static long getKeyCookieQuotaToDate(java.lang.String keyCookie, java.lang.String productName, java.lang.String appPassword) throws EzLicExceptionBase
keyCookie
- last-valid key cookieproductName
- product nameappPassword
- application password, same as that specified
to checkLicenseKeySecure() and createKeyCookieSeed().
EzLicExceptionBase
- or a subclass if an error condition is encountered.public static long getKeyCookieTs(java.lang.String keyCookie, java.lang.String productName, java.lang.String appPassword) throws EzLicExceptionBase
keyCookie
- last-valid key cookieproductName
- product nameappPassword
- application password, same as that specified
to checkLicenseKeySecure() and createKeyCookieSeed().
EzLicExceptionBase
- or a subclass if an error condition is encountered.public int checkSingleUserLicenseKeyBasic(java.lang.String licenseKey, int daysLeftThreshold, long quotaUsageToDate, long quotaThreshold, int daysGracePeriod, long quotaGrace, java.lang.String userHostName) throws EzLicExceptionBase
licenseKey
- license key.daysLeftThreshold
- threshold for # of days
remaining in a time-limited license in order
to trigger an "about-to-expire" warning.quotaUsageToDate
- amount of used quota to date
expressed in license units, if this is
expected to be a metered license.quotaThreshold
- threshold for # of license
units remaining in a metered license in order
to trigger an "about-to-expire" warning.userHostName
- user or host name, for a
user / node locked license. This may be null
if the key was generated with OS enforcement.
EzLicExceptionBase
- in the event of a malformed key or invalid
license.EzLicExceptionBase
public int checkSingleUserLicenseKeyBasic(java.lang.String licenseKey, int daysLeftThreshold, long quotaUsageToDate, long quotaThreshold, int daysGracePeriod, long quotaGrace, java.lang.String userHostName, java.lang.String product, java.lang.String appPassword) throws EzLicExceptionBase
licenseKey
- license key.daysLeftThreshold
- threshold for # of days
remaining in a time-limited license in order
to trigger an "about-to-expire" warning.quotaUsageToDate
- amount of used quota to date
expressed in license units, if this is
expected to be a metered license.quotaThreshold
- threshold for # of license
units remaining in a metered license in order
to trigger an "about-to-expire" warning.userHostName
- user or host name, for a
user / node locked license. This may be null
if the key was generated with OS enforcement.product
- product name. Must match what's in the key if
specified. If not specified, app password can't be
specified either.appPassword
- application password's public key.
One must be supplied if the key contains a password.
EzLicExceptionBase
- in the event of a malformed key or invalid
license.EzLicExceptionBase
public int checkSingleUserLicenseKeyBasic(java.lang.String licenseKey, int daysLeftThreshold, long quotaUsageToDate, long quotaThreshold, int daysGracePeriod, long quotaGrace, java.lang.String userHostName, java.lang.String product, java.lang.String appPassword, boolean strictPwdCheck) throws EzLicExceptionBase
licenseKey
- license key.daysLeftThreshold
- threshold for # of days
remaining in a time-limited license in order
to trigger an "about-to-expire" warning.quotaUsageToDate
- amount of used quota to date
expressed in license units, if this is
expected to be a metered license.quotaThreshold
- threshold for # of license
units remaining in a metered license in order
to trigger an "about-to-expire" warning.userHostName
- user or host name, for a
user / node locked license. This may be null
if the key was generated with OS enforcement.product
- product name. Must match what's in the key if
specified. If not specified, app password can't be
specified either.appPassword
- application password's public key.
One must be supplied if the key contains a password.strictPwdCheck
- Whether the application password provided should be matched
strictly against the application password used at the
time of key generation.If product was not password
protected, then application password can't be provided
if strictPwdCheck is true.Else, it is not an error if an
application password is specified but the key was not
generated with an application password.
EzLicExceptionBase
- in the event of a malformed key or invalid
license.EzLicExceptionBase
public int checkMultiUserLicenseKeyBasic(java.lang.String licenseKey, int daysLeftThreshold, long quotaUsageToDate, long quotaThreshold, int daysGracePeriod, long quotaGrace, java.lang.String hostNetName, long currUsageValue) throws EzLicExceptionBase
licenseKey
- license key.daysLeftThreshold
- threshold for # of days
remaining in a time-limited license in order
to trigger an "about-to-expire" warning.quotaUsageToDate
- amount of remaining quota
expressed in license units, if this is
expected to be a metered license.quotaThreshold
- threshold for # of license
units remaining in a metered license in order
to trigger an "about-to-expire" warning.hostNetName
- (floating) network or (server) host name
for floating / server license.currUsageValue
- current usage value for
floating / concurrent-user / cpu / mhz
usage models.
EzLicExceptionBase
- in the event of a malformed key or invalid
license.EzLicExceptionBase
public int checkMultiUserLicenseKeyBasic(java.lang.String licenseKey, int daysLeftThreshold, long quotaUsageToDate, long quotaThreshold, int daysGracePeriod, long quotaGrace, java.lang.String hostNetName, long currUsageValue, java.lang.String product, java.lang.String appPassword) throws EzLicExceptionBase
licenseKey
- license key.daysLeftThreshold
- threshold for # of days
remaining in a time-limited license in order
to trigger an "about-to-expire" warning.quotaUsageToDate
- amount of remaining quota
expressed in license units, if this is
expected to be a metered license.quotaThreshold
- threshold for # of license
units remaining in a metered license in order
to trigger an "about-to-expire" warning.hostNetName
- (floating) network or (server) host name
for floating / server license.currUsageValue
- current usage value for
floating / concurrent-user / cpu / mhz
usage models.product
- product name. Must match what's in the key if
specified. If not specified, app password can't be
specified either.appPassword
- application password's public key.
One must be supplied if the key contains a password.
EzLicExceptionBase
- in the event of a malformed key or invalid
license.EzLicExceptionBase
public int checkMultiUserLicenseKeyBasic(java.lang.String licenseKey, int daysLeftThreshold, long quotaUsageToDate, long quotaThreshold, int daysGracePeriod, long quotaGrace, java.lang.String hostNetName, long currUsageValue, java.lang.String product, java.lang.String appPassword, boolean strictPwdCheck) throws EzLicExceptionBase
licenseKey
- license key.daysLeftThreshold
- threshold for # of days
remaining in a time-limited license in order
to trigger an "about-to-expire" warning.quotaUsageToDate
- amount of remaining quota
expressed in license units, if this is
expected to be a metered license.quotaThreshold
- threshold for # of license
units remaining in a metered license in order
to trigger an "about-to-expire" warning.hostNetName
- (floating) network or (server) host name
for floating / server license.currUsageValue
- current usage value for
floating / concurrent-user / cpu / mhz
usage models.product
- product name. Must match what's in the key if
specified. If not specified, app password can't be
specified either.appPassword
- application password's public key.
One must be supplied if the key contains a password.strictPwdCheck
- Whether the application password provided should be matched
strictly against the application password used at the
time of key generation.If product was not password
protected, then application password can't be provided
if strictPwdCheck is true.Else, it is not an error if an
application password is specified but the key was not
generated with an application password.
EzLicExceptionBase
- in the event of a malformed key or invalid
license.EzLicExceptionBase
public int checkLicenseKey(java.lang.String licenseKey, EzLicCustomLicenseInterface customKeyHandler, java.lang.Object customKeyContext, int daysLeftThreshold, long quotaUsageToDate, long quotaThreshold, int daysGracePeriod, long quotaGrace, java.lang.String userHostNet, long currUsageValue) throws EzLicExceptionBase
licenseKey
- license key.customKeyHandler
- optional custom license
key handler for processing custom key in
an ISV specific manner. Null if not
specified.customKeyContext
- optional run time context
for custom license key handler above.daysLeftThreshold
- threshold for # of days
remaining in a time-limited license in order
to trigger an "about-to-expire" warning.quotaUsageToDate
- amount of remaining quota
expressed in license units, if this is
expected to be a metered license.quotaThreshold
- threshold for # of license
units remaining in a metered license in order
to trigger an "about-to-expire" warning.daysGracePeriod
- grace period for time limited license
- if today is past expiration date by
less than this many days, set a warning instead of
throwing an exception.quotaGrace
- grace quota - if quota is exceeded by
less than this amount, set a warning instead of
throwing an exception.userHostNet
- user or host or network name, for a
user / node locked / floating license. This may be null
if the key was generated with OS enforcement.currUsageValue
- current usage value for
floating / concurrent-user / cpu / mhz
usage models.
EzLicExceptionBase
- in the event of a malformed key or invalid
license.EzLicExceptionBase
public int checkLicenseKey(java.lang.String licenseKey, EzLicCustomLicenseInterface customKeyHandler, java.lang.Object customKeyContext, int daysLeftThreshold, long quotaUsageToDate, long quotaThreshold, int daysGracePeriod, long quotaGrace, java.lang.String userHostNet, long currUsageValue, java.lang.String product, java.lang.String appPassword) throws EzLicExceptionBase
licenseKey
- license key.customKeyHandler
- optional custom license
key handler for processing custom key in
an ISV specific manner. Null if not
specified.customKeyContext
- optional run time context
for custom license key handler above.daysLeftThreshold
- threshold for # of days
remaining in a time-limited license in order
to trigger an "about-to-expire" warning.quotaUsageToDate
- amount of remaining quota
expressed in license units, if this is
expected to be a metered license.quotaThreshold
- threshold for # of license
units remaining in a metered license in order
to trigger an "about-to-expire" warning.daysGracePeriod
- grace period for time limited license
- if today is past expiration date by
less than this many days, set a warning instead of
throwing an exception.quotaGrace
- grace quota - if quota is exceeded by
less than this amount, set a warning instead of
throwing an exception.userHostNet
- user or host or network name, for a
user / node locked / floating license. If
OS enforcement is enabled for the key and the
app knows this, the parameter can be specified
to be null - but if it is specified, it has to match
what's in the key.currUsageValue
- current usage value for
floating / concurrent-user / cpu / mhz
usage models.product
- product name. Must match what's in the key if
specified. If not specified, app password can't be
specified either.appPassword
- application password's public key.
One must be supplied if the key contains a password.
EzLicExceptionBase
- in the event of a malformed key or invalid
license.EzLicExceptionBase
public int checkLicenseKey(java.lang.String licenseKey, EzLicCustomLicenseInterface customKeyHandler, java.lang.Object customKeyContext, int daysLeftThreshold, long quotaUsageToDate, long quotaThreshold, int daysGracePeriod, long quotaGrace, java.lang.String userHostNet, long currUsageValue, java.lang.String product, java.lang.String appPassword, boolean strictPwdCheck) throws EzLicExceptionBase
licenseKey
- license key.customKeyHandler
- optional custom license
key handler for processing custom key in
an ISV specific manner. Null if not
specified.customKeyContext
- optional run time context
for custom license key handler above.daysLeftThreshold
- threshold for # of days
remaining in a time-limited license in order
to trigger an "about-to-expire" warning.quotaUsageToDate
- amount of remaining quota
expressed in license units, if this is
expected to be a metered license.quotaThreshold
- threshold for # of license
units remaining in a metered license in order
to trigger an "about-to-expire" warning.daysGracePeriod
- grace period for time limited license
- if today is past expiration date by
less than this many days, set a warning instead of
throwing an exception.quotaGrace
- grace quota - if quota is exceeded by
less than this amount, set a warning instead of
throwing an exception.userHostNet
- user or host or network name, for a
user / node locked / floating license. If
OS enforcement is enabled for the key and the
app knows this, the parameter can be specified
to be null - but if it is specified, it has to match
what's in the key.currUsageValue
- current usage value for
floating / concurrent-user / cpu / mhz
usage models.product
- product name. Must match what's in the key if
specified. If not specified, app password can't be
specified either.appPassword
- application password's public key.
One must be supplied if the key contains a password.strictPwdCheck
- Whether the application password provided should be matched
strictly against the application password used at the
time of key generation.If product was not password
protected, then application password can't be provided
if strictPwdCheck is true.Else, it is not an error if an
application password is specified but the key was not
generated with an application password.
EzLicExceptionBase
- in the event of a malformed key or invalid
license.EzLicExceptionBase
public int checkLicenseKey(java.lang.String licenseKey, EzLicCustomLicenseInterface customKeyHandler, java.lang.Object customKeyContext, int daysLeftThreshold, long quotaUsageToDate, long quotaThreshold, int daysGracePeriod, long quotaGrace, java.lang.String userHostNet, long currUsageValue, java.lang.String product, java.lang.String appPassword, java.lang.String hfileDirectory, boolean alwaysCheckTimestamp) throws EzLicExceptionBase
licenseKey
- license key.customKeyHandler
- optional custom license
key handler for processing custom key in
an ISV specific manner. Null if not
specified.customKeyContext
- optional run time context
for custom license key handler above.daysLeftThreshold
- threshold for # of days
remaining in a time-limited license in order
to trigger an "about-to-expire" warning.quotaUsageToDate
- amount of remaining quota
expressed in license units, if this is
expected to be a metered license.quotaThreshold
- threshold for # of license
units remaining in a metered license in order
to trigger an "about-to-expire" warning.daysGracePeriod
- grace period for time limited license
- if today is past expiration date by
less than this many days, set a warning instead of
throwing an exception.quotaGrace
- grace quota - if quota is exceeded by
less than this amount, set a warning instead of
throwing an exception.userHostNet
- user or host or network name, for a
user / node locked / floating license. If
OS enforcement is enabled for the key and the
app knows this, the parameter can be specified
to be null - but if it is specified, it has to match
what's in the key.currUsageValue
- current usage value for
floating / concurrent-user / cpu / mhz
usage models.product
- product name. Must match what's in the key if
specified. If not specified, app password can't be
specified either.appPassword
- application password's public key.
One must be supplied if the key contains a password.hfileDirectory
- preferred hidden-file directory. If
null, and if hidden-file checking is enabled, the
Java "user.home" property is used.alwaysCheckTimestamp
- whether to unconditionally check
the hidden file's timestamp against the system clock.
EzLicExceptionBase
- in the event of a malformed key or invalid
license.EzLicExceptionBase
public int checkLicenseKey(java.lang.String licenseKey, EzLicCustomLicenseInterface customKeyHandler, java.lang.Object customKeyContext, int daysLeftThreshold, long quotaUsageToDate, long quotaThreshold, int daysGracePeriod, long quotaGrace, java.lang.String userHostNet, long currUsageValue, java.lang.String product, java.lang.String appPassword, java.lang.String hfileDirectory, boolean alwaysCheckTimestamp, boolean strictPwdCheck) throws EzLicExceptionBase
licenseKey
- license key.customKeyHandler
- optional custom license
key handler for processing custom key in
an ISV specific manner. Null if not
specified.customKeyContext
- optional run time context
for custom license key handler above.daysLeftThreshold
- threshold for # of days
remaining in a time-limited license in order
to trigger an "about-to-expire" warning.quotaUsageToDate
- amount of remaining quota
expressed in license units, if this is
expected to be a metered license.quotaThreshold
- threshold for # of license
units remaining in a metered license in order
to trigger an "about-to-expire" warning.daysGracePeriod
- grace period for time limited license
- if today is past expiration date by
less than this many days, set a warning instead of
throwing an exception.quotaGrace
- grace quota - if quota is exceeded by
less than this amount, set a warning instead of
throwing an exception.userHostNet
- user or host or network name, for a
user / node locked / floating license. If
OS enforcement is enabled for the key and the
app knows this, the parameter can be specified
to be null - but if it is specified, it has to match
what's in the key.currUsageValue
- current usage value for
floating / concurrent-user / cpu / mhz
usage models.product
- product name. Must match what's in the key if
specified. If not specified, app password can't be
specified either.appPassword
- application password's public key.
One must be supplied if the key contains a password.hfileDirectory
- preferred hidden-file directory. If
null, and if hidden-file checking is enabled, the
Java "user.home" property is used.alwaysCheckTimestamp
- whether to unconditionally check
the hidden file's timestamp against the system clock.strictPwdCheck
- Whether the application password provided should be matched
strictly against the application password used at the
time of key generation.If product was not password
protected, then application password can't be provided
if strictPwdCheck is true.Else, it is not an error if an
application password is specified but the key was not
generated with an application password.
EzLicExceptionBase
- in the event of a malformed key or invalid
license.EzLicExceptionBase
public java.lang.String checkLicenseKeySecure(java.lang.String licenseKey, java.lang.String keyCookie, EzLicExceptionBase customException, EzLicCustomLicenseInterface customKeyHandler, java.lang.Object customKeyContext, int daysLeftThreshold, long quotaUsageToDate, long quotaThreshold, int daysGracePeriod, long quotaGrace, java.lang.String userHostNet, long currUsageValue) throws EzLicExceptionBase
licenseKey
- license key.keyCookie
- the key cookie that was returned
from the previous call to this method for
this key, or from the createKeyCookieSeed()
method if none.customException
- a "success" exception class custom-defined
by the application to be a subclass of
EzLicExceptionBase. If the caller catches this
exception, it signifies success, in which case
the handler's "getMessage()" method returns the
new cookie, and its "getMessageCode()" method
returns the warning bitmap. If a null handler
is specified, control returns normally from this
call with the new cookie as the return value.
The reason for specifying a custom exception handler
is to help foil attempts at hacking the application
code by manipulating binary code that corresponds to
the check for the return value of the license key check
call.customKeyHandler
- optional custom license
key handler for processing custom key in
an ISV specific manner. Null if not
specified.customKeyContext
- optional run time context
for custom license key handler above.daysLeftThreshold
- threshold for # of days
remaining in a time-limited license in order
to trigger an "about-to-expire" warning.quotaUsageToDate
- amount of remaining quota
expressed in license units, if this is
expected to be a metered license.quotaThreshold
- threshold for # of license
units remaining in a metered license in order
to trigger an "about-to-expire" warning.daysGracePeriod
- grace period for time limited license
- if today is past expiration date by
less than this many days, set a warning instead of
throwing an exception.quotaGrace
- grace quota - if quota is exceeded by
less than this amount, set a warning instead of
throwing an exception.userHostNet
- user or host or network name, for a
user / node locked / floating license.currUsageValue
- current usage value for
floating / concurrent-user / cpu / mhz
usage models.
EzLicExceptionBase
- in the event of a malformed key or invalid
license, and also in the event of a successful
license key when a non-null custom exception class is
provided.EzLicExceptionBase
public java.lang.String checkLicenseKeySecure(java.lang.String licenseKey, java.lang.String keyCookie, EzLicExceptionBase customException, EzLicCustomLicenseInterface customKeyHandler, java.lang.Object customKeyContext, int daysLeftThreshold, long quotaUsageToDate, long quotaThreshold, int daysGracePeriod, long quotaGrace, java.lang.String userHostNet, long currUsageValue, java.lang.String product, java.lang.String appPassword, java.lang.String appState) throws EzLicExceptionBase
licenseKey
- license key.keyCookie
- the key cookie that was returned
from the previous call to this method for
this key, or from the createKeyCookieSeed()
method if none.customException
- a "success" exception class custom-defined
by the application to be a subclass of
EzLicExceptionBase. If the caller catches this
exception, it signifies success, in which case
the handler's "getMessage()" method returns the
new cookie, and its "getMessageCode()" method
returns the warning bitmap. If a null handler
is specified, control returns normally from this
call with the new cookie as the return value.
The reason for specifying a custom exception handler
is to help foil attempts at hacking the application
code by manipulating binary code that corresponds to
the check for the return value of the license key check
call.customKeyHandler
- optional custom license
key handler for processing custom key in
an ISV specific manner. Null if not
specified.customKeyContext
- optional run time context
for custom license key handler above.daysLeftThreshold
- threshold for # of days
remaining in a time-limited license in order
to trigger an "about-to-expire" warning.quotaUsageToDate
- amount of consumed quota,
if this is expected to be a metered license
and the value is positive. If the value is
negative, it represents the incremental
quota consumption by which to reduce the
available balance that is stored in the key cookie.quotaThreshold
- threshold for # of license
units remaining in a metered license in order
to trigger an "about-to-expire" warning.daysGracePeriod
- grace period for time limited license
- if today is past expiration date by
less than this many days, set a warning instead of
throwing an exception.quotaGrace
- grace quota - if quota is exceeded by
less than this amount, set a warning instead of
throwing an exception.userHostNet
- user or host or network name, for a
user / node locked / floating license.currUsageValue
- current usage value for
floating / concurrent-user / cpu / mhz
usage models.product
- product name. Must match what's in the key if
specified. If not specified, app password can't be
specified either.appPassword
- application password's public key.
One must be supplied if the key contains a password.appState
- stringified generic license related
application state to embed in the key cookie for
later retrieval.
EzLicExceptionBase
- in the event of a malformed key or invalid
license, and also in the event of a successful
license key when a non-null custom exception class is
provided.EzLicExceptionBase
public java.lang.String checkLicenseKeySecure(java.lang.String licenseKey, java.lang.String keyCookie, EzLicExceptionBase customException, EzLicCustomLicenseInterface customKeyHandler, java.lang.Object customKeyContext, int daysLeftThreshold, long quotaUsageToDate, long quotaThreshold, int daysGracePeriod, long quotaGrace, java.lang.String userHostNet, long currUsageValue, java.lang.String product, java.lang.String appPassword, java.lang.String appState, boolean strictPwdCheck) throws EzLicExceptionBase
licenseKey
- license key.keyCookie
- the key cookie that was returned
from the previous call to this method for
this key, or from the createKeyCookieSeed()
method if none.customException
- a "success" exception class custom-defined
by the application to be a subclass of
EzLicExceptionBase. If the caller catches this
exception, it signifies success, in which case
the handler's "getMessage()" method returns the
new cookie, and its "getMessageCode()" method
returns the warning bitmap. If a null handler
is specified, control returns normally from this
call with the new cookie as the return value.
The reason for specifying a custom exception handler
is to help foil attempts at hacking the application
code by manipulating binary code that corresponds to
the check for the return value of the license key check
call.customKeyHandler
- optional custom license
key handler for processing custom key in
an ISV specific manner. Null if not
specified.customKeyContext
- optional run time context
for custom license key handler above.daysLeftThreshold
- threshold for # of days
remaining in a time-limited license in order
to trigger an "about-to-expire" warning.quotaUsageToDate
- amount of consumed quota,
if this is expected to be a metered license
and the value is positive. If the value is
negative, it represents the incremental
quota consumption by which to reduce the
available balance that is stored in the key cookie.quotaThreshold
- threshold for # of license
units remaining in a metered license in order
to trigger an "about-to-expire" warning.daysGracePeriod
- grace period for time limited license
- if today is past expiration date by
less than this many days, set a warning instead of
throwing an exception.quotaGrace
- grace quota - if quota is exceeded by
less than this amount, set a warning instead of
throwing an exception.userHostNet
- user or host or network name, for a
user / node locked / floating license.currUsageValue
- current usage value for
floating / concurrent-user / cpu / mhz
usage models.product
- product name. Must match what's in the key if
specified. If not specified, app password can't be
specified either.appPassword
- application password's public key.
One must be supplied if the key contains a password.appState
- stringified generic license related
application state to embed in the key cookie for
later retrieval.strictPwdCheck
- Whether the application password provided should be matched
strictly against the application password used at the
time of key generation.If product was not password
protected, then application password can't be provided
if strictPwdCheck is true.Else, it is not an error if an
application password is specified but the key was not
generated with an application password.
EzLicExceptionBase
- in the event of a malformed key or invalid
license, and also in the event of a successful
license key when a non-null custom exception class is
provided.EzLicExceptionBase
public java.lang.String checkLicenseKeySecure(java.lang.String licenseKey, java.lang.String keyCookie, EzLicExceptionBase customException, EzLicCustomLicenseInterface customKeyHandler, java.lang.Object customKeyContext, int daysLeftThreshold, long quotaUsageToDate, long quotaThreshold, int daysGracePeriod, long quotaGrace, java.lang.String userHostNet, long currUsageValue, java.lang.String product, java.lang.String appPassword, java.lang.String appState, java.lang.String hfileDirectory, boolean alwaysCheckTimestamp) throws EzLicExceptionBase
licenseKey
- license key.keyCookie
- the key cookie that was returned
from the previous call to this method for
this key, or from the createKeyCookieSeed()
method if none.customException
- a "success" exception class custom-defined
by the application to be a subclass of
EzLicExceptionBase. If the caller catches this
exception, it signifies success, in which case
the handler's "getMessage()" method returns the
new cookie, and its "getMessageCode()" method
returns the warning bitmap. If a null handler
is specified, control returns normally from this
call with the new cookie as the return value.
The reason for specifying a custom exception handler
is to help foil attempts at hacking the application
code by manipulating binary code that corresponds to
the check for the return value of the license key check
call.customKeyHandler
- optional custom license
key handler for processing custom key in
an ISV specific manner. Null if not
specified.customKeyContext
- optional run time context
for custom license key handler above.daysLeftThreshold
- threshold for # of days
remaining in a time-limited license in order
to trigger an "about-to-expire" warning.quotaUsageToDate
- amount of consumed quota,
if this is expected to be a metered license
and the value is positive. If the value is
negative, it represents the incremental
quota consumption by which to reduce the
available balance that is stored in the key cookie.quotaThreshold
- threshold for # of license
units remaining in a metered license in order
to trigger an "about-to-expire" warning.daysGracePeriod
- grace period for time limited license
- if today is past expiration date by
less than this many days, set a warning instead of
throwing an exception.quotaGrace
- grace quota - if quota is exceeded by
less than this amount, set a warning instead of
throwing an exception.userHostNet
- user or host or network name, for a
user / node locked / floating license.currUsageValue
- current usage value for
floating / concurrent-user / cpu / mhz
usage models.product
- product name. Must match what's in the key if
specified. If not specified, app password can't be
specified either.appPassword
- application password's public key.
One must be supplied if the key contains a password.appState
- stringified generic license related
application state to embed in the key cookie for
later retrieval.hfileDirectory
- preferred hidden-file directory. If
null, and if hidden-file checking is enabled, the
Java "user.home" property is used.alwaysCheckTimestamp
- whether to unconditionally check
the hidden file's timestamp against the system clock.
EzLicExceptionBase
- in the event of a malformed key or invalid
license, and also in the event of a successful
license key when a non-null custom exception class is
provided.EzLicExceptionBase
public java.lang.String checkLicenseKeySecure(java.lang.String licenseKey, java.lang.String keyCookie, EzLicExceptionBase customException, EzLicCustomLicenseInterface customKeyHandler, java.lang.Object customKeyContext, int daysLeftThreshold, long quotaUsageToDate, long quotaThreshold, int daysGracePeriod, long quotaGrace, java.lang.String userHostNet, long currUsageValue, java.lang.String product, java.lang.String appPassword, java.lang.String appState, java.lang.String hfileDirectory, boolean alwaysCheckTimestamp, boolean strictPwdCheck) throws EzLicExceptionBase
licenseKey
- license key.keyCookie
- the key cookie that was returned
from the previous call to this method for
this key, or from the createKeyCookieSeed()
method if none.customException
- a "success" exception class custom-defined
by the application to be a subclass of
EzLicExceptionBase. If the caller catches this
exception, it signifies success, in which case
the handler's "getMessage()" method returns the
new cookie, and its "getMessageCode()" method
returns the warning bitmap. If a null handler
is specified, control returns normally from this
call with the new cookie as the return value.
The reason for specifying a custom exception handler
is to help foil attempts at hacking the application
code by manipulating binary code that corresponds to
the check for the return value of the license key check
call.customKeyHandler
- optional custom license
key handler for processing custom key in
an ISV specific manner. Null if not
specified.customKeyContext
- optional run time context
for custom license key handler above.daysLeftThreshold
- threshold for # of days
remaining in a time-limited license in order
to trigger an "about-to-expire" warning.quotaUsageToDate
- amount of consumed quota,
if this is expected to be a metered license
and the value is positive. If the value is
negative, it represents the incremental
quota consumption by which to reduce the
available balance that is stored in the key cookie.quotaThreshold
- threshold for # of license
units remaining in a metered license in order
to trigger an "about-to-expire" warning.daysGracePeriod
- grace period for time limited license
- if today is past expiration date by
less than this many days, set a warning instead of
throwing an exception.quotaGrace
- grace quota - if quota is exceeded by
less than this amount, set a warning instead of
throwing an exception.userHostNet
- user or host or network name, for a
user / node locked / floating license.currUsageValue
- current usage value for
floating / concurrent-user / cpu / mhz
usage models.product
- product name. Must match what's in the key if
specified. If not specified, app password can't be
specified either.appPassword
- application password's public key.
One must be supplied if the key contains a password.appState
- stringified generic license related
application state to embed in the key cookie for
later retrieval.hfileDirectory
- preferred hidden-file directory. If
null, and if hidden-file checking is enabled, the
Java "user.home" property is used.alwaysCheckTimestamp
- whether to unconditionally check
the hidden file's timestamp against the system clock.strictPwdCheck
- Whether the application password provided should be matched
strictly against the application password used at the
time of key generation.If product was not password
protected, then application password can't be provided
if strictPwdCheck is true.Else, it is not an error if an
application password is specified but the key was not
generated with an application password.
EzLicExceptionBase
- in the event of a malformed key or invalid
license, and also in the event of a successful
license key when a non-null custom exception class is
provided.EzLicExceptionBase
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |