org.rhq.enterprise.server.license
Class LicenseManager
java.lang.Object
org.rhq.enterprise.server.license.LicenseManager
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Runnable
public final class LicenseManager
- extends java.lang.Object
- implements java.lang.Runnable, java.io.Serializable
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FEATURE_MONITOR
public static final int FEATURE_MONITOR
- See Also:
- Constant Field Values
ic
protected transient javax.naming.InitialContext ic
JNDI_NAME
protected java.lang.String JNDI_NAME
instance
public static LicenseManager instance()
checkLicense
public static void checkLicense(java.io.InputStream licenseFile)
throws LicenseParsingException,
UnavailableLicenseException,
CorruptLicenseException,
UpdateTrialLicenseException
- Tests a license file by running it through the parser. Throws an exception if something fails to parse. Proper
exceptions should really be integrated at some point.
- Throws:
LicenseParsingException
UnavailableLicenseException
CorruptLicenseException
UpdateTrialLicenseException
doHalt
protected static final void doHalt(java.lang.String msg,
java.lang.Exception e)
doHalt
protected static final void doHalt(java.lang.String msg)
doStartupCheck
public final void doStartupCheck(java.lang.String licenseFile)
- Called by ProductPluginDeployer at startup to enforce the following license provisions: :
ensure that the customer's license has not expired : ensure that at least one of the server's IPs
matches one of the licensed IPs.
isLicenseExpired
public boolean isLicenseExpired()
isLicenseLoaded
public boolean isLicenseLoaded()
run
public void run()
- Specified by:
run in interface java.lang.Runnable
isPluginEnabled
public boolean isPluginEnabled(java.lang.String name)
enforcePlatformLimit
public void enforcePlatformLimit(int count)
throws PlatformLimitException
- Throws:
PlatformLimitException
enforceFeatureLimit
public void enforceFeatureLimit(int feature)
throws FeatureUnavailableException
- Throws:
FeatureUnavailableException
enforceFeatureLimit
public static void enforceFeatureLimit(License license,
int feature)
throws FeatureUnavailableException
- Throws:
FeatureUnavailableException
getLicense
public License getLicense()
getLicenseFileName
public static java.lang.String getLicenseFileName()
getExpiration
public long getExpiration()
throws LicenseException
- Returns:
- The expiration time in millis, or -1 if there is no expiration.
- Throws:
LicenseException
getLicenseInfoString
public java.lang.String getLicenseInfoString()
Copyright © 2008-2009 Red Hat, Inc.. All Rights Reserved.