Class LicenseComponent

  • All Implemented Interfaces:

    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()).

        function - the function
        version - the version
        capacity - the capacity
        hardLimited - whether the capacity of the license can be exceeded (false) or not (true).
        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.

      • getFunction

        public String getFunction()

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

        the function
      • getVersion

        public String getVersion()

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

        the version
      • getCapacity

        public long getCapacity()

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

        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).

        true if this LicenseComponent is hard limited