|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jp.protection.pub.pro.BackgroundLicenseCheck
public class BackgroundLicenseCheck
Utility class to schedule background license check based on the specified license's check period.
BackgroundLicenseCheck will perform optional license re-reading if the license file has been updated on the disk.
The usage would be:
BackgroundLicenseCheck backgroundLicenseCheck = new BackgroundLicenseCheck(licenseHost, productInfo);
backgroundLicenseCheck.start();
Field Summary | |
---|---|
protected boolean |
fCheckLicense
|
protected java.lang.Thread |
fCheckLicenseThread
|
protected long |
fCheckPeriod
|
protected boolean |
fLicenseFileCanRead
|
protected long |
fLicenseFileModificationTime
|
protected LicenseHostPro |
fLicenseHost
|
protected ProductInfo |
fProductInfo
|
Constructor Summary | |
---|---|
BackgroundLicenseCheck(LicenseHostPro aLicenseHost,
ProductInfo aProductInfo)
Creates a new instance of the BackgroundLicenseCheck |
|
BackgroundLicenseCheck(ProtectionLauncher aProtectionLauncher)
Creates a new instance of the BackgroundLicenseCheck |
Method Summary | |
---|---|
boolean |
checkLicense()
Checks license and forces LicenseReader to re-read license if the license file has been updated on the disk. |
boolean |
checkLicense(boolean aForceLicenseRead)
Checks license |
protected void |
checkLicenseImpl(boolean aForceLicenseRead)
|
protected java.lang.Thread |
getCheckLicenseThread()
|
long |
getCheckPeriod()
Returns license check period |
boolean |
isRunning()
Returns whether the license check backround procees is running |
void |
setCheckPeriod(long aCheckPeriod)
Specifies license check period |
void |
start()
Starts license check in the background |
void |
stop()
Stops the license check background process |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected LicenseHostPro fLicenseHost
protected ProductInfo fProductInfo
protected boolean fCheckLicense
protected java.lang.Thread fCheckLicenseThread
protected long fLicenseFileModificationTime
protected boolean fLicenseFileCanRead
protected long fCheckPeriod
Constructor Detail |
---|
public BackgroundLicenseCheck(LicenseHostPro aLicenseHost, ProductInfo aProductInfo)
BackgroundLicenseCheck
aLicenseHost
- license host to work withaProductInfo
- product informationpublic BackgroundLicenseCheck(ProtectionLauncher aProtectionLauncher)
BackgroundLicenseCheck
aProtectionLauncher
- Protection! launcher to work withMethod Detail |
---|
public boolean isRunning()
true
if license check is running; false
otherwisepublic void start()
public void stop()
public long getCheckPeriod()
60000L
by default)public void setCheckPeriod(long aCheckPeriod)
aCheckPeriod
- license check period to set in millisprotected java.lang.Thread getCheckLicenseThread()
public boolean checkLicense()
true
if license is OK; false
otherwisepublic boolean checkLicense(boolean aForceLicenseRead)
aForceLicenseRead
- forces the LicenseReader
to re-read license
true
if license is OK; false
otherwiseprotected void checkLicenseImpl(boolean aForceLicenseRead)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |