|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atomikos.license.License
public abstract class License
A utility class for checking if the local machine is allowed to run the software according to the specified license file. The license file is checked for integrity by checking the signature. A license is assigned based on the IP address or domain of the host.
Field Summary | |
---|---|
static String |
DEVELOPER_TYPE_PROPERTY_VALUE
Value of license type property that indicates development use only. |
static String |
DOMAIN_PROPERTY_NAME
The name of the license file property indicating what domain the license is for. |
static String |
DOMAIN_TYPE_PROPERTY_VALUE
The value of the license type property indicating a domain-based license. |
static String |
EVAL_TYPE_PROPERTY_VALUE
The value of the license type property indicating an evaluation license. |
static String |
EXPIRES_PROPERTY_NAME
The name of the property whose value indicates the expiration date of the license. |
static String |
HOST_TYPE_PROPERTY_VALUE
The value of the license type property indicating a host-based license. |
static String |
HOSTS_PROPERTY_NAME
The name of the license property that indicates the different hosts a license is for. |
static String |
LICENSE_FILE_BASE_NAME
The base name of the license files. |
static String |
LICENSE_PROPERTY_FILE_NAME
The name of the property license file. |
static String |
LICENSE_SIGNATURE_FILE_NAME
The name of the signature license file. |
static String |
LICENSE_TYPE_PROPERTY_NAME
The name of the license property that indicates the type of license. |
static String |
OWNER_PROPERTY_NAME
The name of the property indicating the license owner. |
static String |
PRODUCT_NAME_PROPERTY_NAME
The name of the property that holds the product name. |
static String |
UNLIMITED_TYPE_PROPERTY_VALUE
The value of the license type property indicating an unlimited hosts license. |
Constructor Summary | |
---|---|
protected |
License(Properties properties)
|
Method Summary | |
---|---|
void |
checkLocalHost(String productName)
Checks if the local host is allowed to run a product of the specified version. |
static License |
createInformationalLicense()
Create a purely information license instance based on the URL. |
static License |
createLicense(String key)
Create a license instance. |
void |
filterProductFeatures(Properties productFeatures)
Filter out any license-bound product features. |
protected String |
getProperty(String name)
|
void |
printInfo(PrintWriter out)
Print information about the license to the supplied output. |
protected void |
sendForm(String productName,
String ownerName)
|
static void |
setDigestName(String name)
Set the digest algorithm name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String LICENSE_FILE_BASE_NAME
public static final String LICENSE_PROPERTY_FILE_NAME
public static final String LICENSE_SIGNATURE_FILE_NAME
public static final String PRODUCT_NAME_PROPERTY_NAME
public static final String LICENSE_TYPE_PROPERTY_NAME
public static final String HOSTS_PROPERTY_NAME
public static final String DOMAIN_PROPERTY_NAME
public static final String EXPIRES_PROPERTY_NAME
public static final String EVAL_TYPE_PROPERTY_VALUE
public static final String HOST_TYPE_PROPERTY_VALUE
public static final String DOMAIN_TYPE_PROPERTY_VALUE
public static final String UNLIMITED_TYPE_PROPERTY_VALUE
public static final String DEVELOPER_TYPE_PROPERTY_VALUE
public static final String OWNER_PROPERTY_NAME
Constructor Detail |
---|
protected License(Properties properties)
Method Detail |
---|
public static void setDigestName(String name)
name
- The name of the alg to use.public static License createLicense(String key) throws CorruptLicenseException, IOException
key
- The key data to be used for checking the license signature.
CorruptLicenseException
- If the license file appears to be
corrupt.
IOException
- If the file(s) could not be read.public static License createInformationalLicense() throws IOException
IOException
protected String getProperty(String name)
public void checkLocalHost(String productName) throws UnknownHostException, CorruptLicenseException, InvalidMachineLicenseException, ExpiredLicenseException, WrongProductLicenseException
productName
- The name of the product.
CorruptLicenseException
- If tampering is detected.
InvalidMachineLicenseException
- If the IP is wrong.
ExpiredLicenseException
- If the license has expired.
UnknownHostException
- If the IP could not be determined.
WrongProductLicenseException
- If the wrong product for this license.public void printInfo(PrintWriter out)
out
- The output.public void filterProductFeatures(Properties productFeatures)
productFeatures
- The product features
in the form of Properties. Any license-bound
properties will be set during this method.protected void sendForm(String productName, String ownerName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |