Class BrokerLicense


  • public class BrokerLicense
    extends java.lang.Object
    This class is used to validate runtime licenses and to parse information out of the runtime license key string.
    • Constructor Detail

      • BrokerLicense

        public BrokerLicense()
    • Method Detail

      • simpleValidate

        public static int simpleValidate​(java.lang.String license_string)
        Determines if the license format is valid, but does not fully validate the license. This includes a an expiration date test for evaluation licenses. Note: This method requires access to a native shared library. Returns VALIDATE_OKAY on success, VALIDATE_BAD_LICENSE on a format error or VALIDATE_EXPIRED on expiration.
      • getProduct

        public static java.lang.String getProduct​(java.lang.String license_string)
                                           throws BrokerException
        Get the product the license is for. Throws an exception if there is an error parsing the license string.
        Throws:
        BrokerException
      • getPlatform

        public static int getPlatform​(java.lang.String license_string)
                               throws BrokerException
        Get the platform the license is for. See the PLATFORM_* constants. The value is a bitmask. Throws an exception if there is an error parsing the license string.
        Throws:
        BrokerException
      • getMajorVersion

        public static int getMajorVersion​(java.lang.String license_string)
                                   throws BrokerException
        Get the major version the license is for. For example, the '2.1' release's major version is '2'. Returns zero(0) if "don't care" has been set for the major version. Throws an exception if there is an error parsing the license string.
        Throws:
        BrokerException
      • getMinorVersion

        public static int getMinorVersion​(java.lang.String license_string)
                                   throws BrokerException
        Get the minor version the license is for. For example, the '2.1' release's minor version is '1'. Returns minus one(-1) if "don't care" has been set for the minor version. Throws an exception if there is an error parsing the license string.
        Throws:
        BrokerException
      • getExpiration

        public static BrokerDate getExpiration​(java.lang.String license_string)
                                        throws BrokerException
        Get expiration date. Returns null if this is not an evaluation license and therefore does not expire. Throws an exception if there is an error parsing the license string.
        Throws:
        BrokerException
      • getSerialNumber

        public static long getSerialNumber​(java.lang.String license_string)
                                    throws BrokerException
        Get the serial number of the license. Throws an exception if there is an error parsing the license string.
        Throws:
        BrokerException
      • getFlags

        public static java.lang.String[] getFlags​(java.lang.String license_string)
                                           throws BrokerException
        Get the set of flag strings in the license. Throws an exception if there is an error parsing the license string.
        Throws:
        BrokerException