|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jp.protection.pub.launch.HeadlessProtectionLauncher
public class HeadlessProtectionLauncher
This class represents the entry point to the licensing functionality. It holds all the Protection! configuration data and provides various access and utility methods. The sample use case would be as follows:
ProtectionLauncherConfigReader reader = new ProtectionLauncherConfigReader();
reader.setDecryptKeyBytes(...);
reader.setSecurityAlgorithm("RSA - 512");
ProtectionLauncher launcher = ProtectionLauncher.getProtectionLauncher(reader, ProtectionLauncher.class,
  "DemoCalc.launcher", owner);
launcher.checkLicense();
Field Summary | |
---|---|
protected ProtectionLauncherConfig |
fLauncherConfig
|
protected LicenseHost |
fLicenseHost
|
protected LicenseListener |
fLicenseListener
|
protected LicenseReader |
fLicenseReader
|
protected boolean |
fVerbose
|
Constructor Summary | |
---|---|
HeadlessProtectionLauncher(ProtectionLauncherConfig aLauncherConfig)
Creates a new instance of the launcher. |
|
HeadlessProtectionLauncher(ProtectionLauncherConfig aLauncherConfig,
LicenseReader aLicenseReader)
Creates a new instance of the launcher. |
Method Summary | |
---|---|
boolean |
canCheckoutLicense()
Tests whether a License can be checked out for offline use |
boolean |
canTerminateLicensePass()
Tests whether License Pass can be terminated |
boolean |
checkLicense()
Reads the license and check it against specified configuration |
boolean |
checkLicense(boolean aForceLicenseRead)
Reads the license and check it against specified configuration |
boolean |
checkoutLicense()
Checks out a License for offline use without need to lock the License using Licensing Server |
protected LicenseAcceptanceDelegate |
createLicenseAcceptanceDelegate()
|
protected LicenseHost |
createLicenseHost()
|
protected LicenseHostIssueResolver |
createLicenseHostIssueResolver()
|
protected LicenseReader |
createLicenseReader()
|
protected LicenseReaderIssueResolver |
createLicenseReaderIssueResolver()
|
protected void |
error(java.lang.Exception ex)
|
static HeadlessProtectionLauncher |
getHeadlessProtectionLauncher(ProtectionLauncherConfigReader aReader,
java.lang.Class aBaseCLass,
java.lang.String aLauncherConfigResourceName)
Creates a new launcher instance and initializes it with configuration loaded from resource. |
static HeadlessProtectionLauncher |
getHeadlessProtectionLauncher(ProtectionLauncherConfigReader aReader,
java.lang.Class aBaseCLass,
java.lang.String aLauncherConfigResourceName,
LicenseReader aLicenseReader)
Creates a new launcher instance and initializes it with configuration loaded from resource. |
ProtectionLauncherConfig |
getLauncherConfig()
Returns launcher configuration |
LicenseHost |
getLicenseHost()
Returns license host used by the launcher to check licenses |
LicenseReader |
getLicenseReader()
Returns license reader used by the launcher to locate and read licenses |
protected java.util.prefs.Preferences |
getPreferences()
|
protected java.lang.String |
getProductEditionName(License license)
|
ProductInfo |
getProductInfo()
Returns product information |
void |
init()
Initializes launcher instance |
protected void |
initLicenseHost()
|
protected void |
initLicenseListener()
|
protected void |
initLicenseReader()
|
protected void |
initLicensingFacades()
|
protected void |
initLicensingServerConnections()
|
protected void |
initProfessional(ProtectionLauncherConfig config)
|
protected void |
initSecretStorages()
|
boolean |
isVerbose()
Checks whether launcher runs in verbose mode. |
void |
replaceDefaultLicenseListener(LicenseListener aLicenseListener)
Replaces default license listener with supplied one |
void |
setVerbose(boolean aVerbose)
Specifies that launcher should be run in verbose mode. |
boolean |
terminateLicensePass()
Terminate ability to use a License offline by removing corresponding License Pass |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ProtectionLauncherConfig fLauncherConfig
protected LicenseReader fLicenseReader
protected LicenseHost fLicenseHost
protected LicenseListener fLicenseListener
protected boolean fVerbose
Constructor Detail |
---|
public HeadlessProtectionLauncher(ProtectionLauncherConfig aLauncherConfig)
aLauncherConfig
- launcher configurationpublic HeadlessProtectionLauncher(ProtectionLauncherConfig aLauncherConfig, LicenseReader aLicenseReader)
aLauncherConfig
- launcher configurationaLicenseReader
- LicenseReader custom license reader should be used by the launcher to locate
and read licensesMethod Detail |
---|
public ProductInfo getProductInfo()
public ProtectionLauncherConfig getLauncherConfig()
protected java.lang.String getProductEditionName(License license)
public LicenseHost getLicenseHost()
public LicenseReader getLicenseReader()
protected void initLicenseReader()
protected LicenseReaderIssueResolver createLicenseReaderIssueResolver()
protected LicenseReader createLicenseReader()
protected void initLicenseListener()
protected void initLicenseHost()
protected void error(java.lang.Exception ex)
protected LicenseHostIssueResolver createLicenseHostIssueResolver()
protected LicenseAcceptanceDelegate createLicenseAcceptanceDelegate()
protected LicenseHost createLicenseHost()
public void init()
protected void initProfessional(ProtectionLauncherConfig config)
protected void initSecretStorages()
protected void initLicensingFacades()
protected void initLicensingServerConnections()
public boolean checkLicense(boolean aForceLicenseRead)
aForceLicenseRead
- forces LicenseReader to re-read license
true
if license is properly read and validated;
false
otherwisepublic boolean checkLicense()
true
if license is properly read and validated;
false
otherwisepublic boolean isVerbose()
true
if launcher runs in verbose mode, false
otherwise.public void setVerbose(boolean aVerbose)
stderr
. Otherwise there is no output in order to prevent the code flow
analysis.
aVerbose
- true
if launcher should run in verbose mode,
false
otherwise.public static HeadlessProtectionLauncher getHeadlessProtectionLauncher(ProtectionLauncherConfigReader aReader, java.lang.Class aBaseCLass, java.lang.String aLauncherConfigResourceName, LicenseReader aLicenseReader) throws java.io.IOException
aReader
- reader used to read launcher configurationaBaseCLass
- base class used to to load configuration resourceaLauncherConfigResourceName
- name of resourceaLicenseReader
- LicenseReader custom license reader should be used by the launcher to locate
and read licenses
java.io.IOException
- when any error occured during configuration loadpublic static HeadlessProtectionLauncher getHeadlessProtectionLauncher(ProtectionLauncherConfigReader aReader, java.lang.Class aBaseCLass, java.lang.String aLauncherConfigResourceName) throws java.io.IOException
aReader
- reader used to read launcher configurationaBaseCLass
- base class used to to load configuration resourceaLauncherConfigResourceName
- name of resource
java.io.IOException
- when any error occured during configuration loadpublic void replaceDefaultLicenseListener(LicenseListener aLicenseListener)
aLicenseListener
- a new license listener to setupprotected java.util.prefs.Preferences getPreferences()
public boolean checkoutLicense()
true
if license has been successfully checked out; false
otherwisepublic boolean canCheckoutLicense()
true
if license can be checked out; false
otherwisepublic boolean terminateLicensePass()
true
if License Pass has been terminated; false
otherwisepublic boolean canTerminateLicensePass()
true
if License can be terminated; false
otherwise
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |