|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.jp.protection.priv.LicenseReaderFacade
public class LicenseReaderFacade
This class represents a "facade" that significantly simplifies licenses reading process
| Field Summary | |
|---|---|
protected ProductLicenseReader |
fLicenseReader
|
protected ProductsStorage |
fProductsStorage
|
| Constructor Summary | |
|---|---|
LicenseReaderFacade(java.io.File aProductsStorageFile)
Creates a new instance of the LicenseReaderFacade and loads a product
storage from the specified file |
|
LicenseReaderFacade(java.io.InputStream aProductsStorageInputStream)
Creates a new instance of the LicenseReaderFacade and loads a product
storage from the specified stream |
|
LicenseReaderFacade(ProductsStorage aProductsStorage)
Creates a new instance of the LicenseReaderFacade and uses shared and already loaded product storage |
|
| Method Summary | |
|---|---|
void |
addLicenseReaderListener(LicenseReaderListener l)
Adds license reader listener. |
boolean |
isSkipEncryption()
Checks whether license encryption process should be skipped. |
boolean |
isVerbose()
Checks whether facade runs in verbose mode. |
void |
licenseAboutToRead(LicenseReader aSource,
java.lang.String aProductID)
License reader calls this method to notify listener that the license is about to be read and specifies a known ID of the product this license is issued for. |
void |
licenseAvailable(LicenseReader aSource,
java.lang.String aLicenseLocation)
License reader calls this method to notify listener that the license is successfully read and available for use. |
void |
licenseCorrupted(LicenseReader aSource,
java.lang.String aLicenseLocation)
License reader calls this method to notify listener that the license is corrupted and therefore can not be read. |
void |
licenseMissing(LicenseReader aSource,
java.lang.String aLicenseLocation)
License reader calls this method to notify listener when the license is not found neither in the resource folder nor in the file system. |
License |
readLicense(byte[] aLicenseBytes)
|
License |
readLicense(java.io.File aFile)
|
License |
readLicense(java.io.InputStream anInputStream,
java.lang.String aLicenseLocation)
|
void |
removeLicenseReaderListener(LicenseReaderListener l)
Removes license reader listener. |
void |
setSkipEncryption(boolean aSkipEncryption)
Specifies that the license encryption process should be skipped. |
void |
setVerbose(boolean aVerbose)
Specifies that facade should run in verbose mode. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ProductLicenseReader fLicenseReader
protected ProductsStorage fProductsStorage
| Constructor Detail |
|---|
public LicenseReaderFacade(java.io.InputStream aProductsStorageInputStream)
throws java.io.IOException
LicenseReaderFacade and loads a product
storage from the specified stream
aProductsStorageInputStream - input stream to load a products storage from
java.io.IOException - in case of errors during a products storage loading process
public LicenseReaderFacade(java.io.File aProductsStorageFile)
throws java.io.IOException
LicenseReaderFacade and loads a product
storage from the specified file
aProductsStorageFile - file to load a products storage from
java.io.IOException - in case of errors during a products storage loading processpublic LicenseReaderFacade(ProductsStorage aProductsStorage)
LicenseReaderFacade and uses shared and already loaded product storage
aProductsStorage - products storage value| Method Detail |
|---|
public void addLicenseReaderListener(LicenseReaderListener l)
l - license listener instance.public void removeLicenseReaderListener(LicenseReaderListener l)
l - license listener instance.public boolean isSkipEncryption()
true license encryption should be skipped,
false otherwise.public void setSkipEncryption(boolean aSkipEncryption)
aSkipEncryption - true if license encryption should be skipped, false
otherwise.public License readLicense(java.io.File aFile)
public License readLicense(java.io.InputStream anInputStream,
java.lang.String aLicenseLocation)
public License readLicense(byte[] aLicenseBytes)
public void licenseAboutToRead(LicenseReader aSource,
java.lang.String aProductID)
LicenseReaderListener
licenseAboutToRead in interface LicenseReaderListeneraSource - the license reader.aProductID - ID of the product this license is issued for.
public void licenseMissing(LicenseReader aSource,
java.lang.String aLicenseLocation)
LicenseReaderListener
licenseMissing in interface LicenseReaderListeneraSource - the license reader.aLicenseLocation - full path to the license file.
public void licenseCorrupted(LicenseReader aSource,
java.lang.String aLicenseLocation)
LicenseReaderListener
licenseCorrupted in interface LicenseReaderListeneraSource - the license reader.aLicenseLocation - full path to the license file.
public void licenseAvailable(LicenseReader aSource,
java.lang.String aLicenseLocation)
LicenseReaderListener
licenseAvailable in interface LicenseReaderListeneraSource - the license reader.aLicenseLocation - full path to the license file.public boolean isVerbose()
true if writer runs in verbose mode, false
otherwise.public void setVerbose(boolean aVerbose)
stderr.
Otherwise there is no output generated in order to prevent the "code flow" analysis.
aVerbose - true if facade should run in verbose mode,
false otherwise.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||