Class LicenseComponent

  • All Implemented Interfaces:
    Serializable

    public class LicenseComponent
    extends Object
    implements Serializable

    Simple container class for storing function, version, and capacity inside LicenseInfo objects.

    See Also:
    Serialized Form
    • Constructor Detail

      • LicenseComponent

        public LicenseComponent​(String function,
                                String version,
                                long capacity,
                                boolean hardLimited)
                         throws LicenseException

        Create a new LicenseComponent with the specified function, version, and capacity. A LicenseException will be thrown if the license component is not valid (see checkValidity()).

        Parameters:
        function - the function
        version - the version
        capacity - the capacity
        hardLimited - whether the capacity of the license can be exceeded (false) or not (true).
        Throws:
        LicenseException - if an invalid function, version, or capacity was specified.
    • Method Detail

      • checkValidity

        public void checkValidity()
                           throws LicenseException

        Throws a LicenseException if this LicenseComponent is not valid. This can be the case when the function or version are specified as null or empty, or a negative capacity has been specified.

        Throws:
        LicenseException
      • getFunction

        public String getFunction()

        Returns the function for this LicenseComponent. This will always return a non-empty string.

        Returns:
        the function
      • getVersion

        public String getVersion()

        Returns the version for this LicenseComponent. This will always return a non-empty string.

        Returns:
        the version
      • getCapacity

        public long getCapacity()

        Returns the capacity for this LicenseComponent. This will always be a non-negative value.

        Returns:
        the capacity
      • getHardLimited

        public boolean getHardLimited()

        Returns whether the capacity of this LicenseComponent can be exceeded or not. If this is set to true, then the SLEE will limit throughput for this function/version to the capacity. If it is set to false, then the SLEE will warn when the capacity has been exceeded (but not drop any events).

        Returns:
        true if this LicenseComponent is hard limited