com.groupdocs.redaction.licensing

Class Metered



  • public class Metered
    extends Object

    Provides methods which allow to activate product with Metered license and retrieve amount of MBs processed. Learn more about Metered licenses here.

    • Constructor Detail

      • Metered

        public Metered()

        Initializes a new instance of Metered class.

    • Method Detail

      • setMeteredKey

        public final void setMeteredKey(String publicKey,
                         String privateKey)

        Activates the product with Metered keys.

        Parameters:
        publicKey - The public key.
        privateKey - The private key.
      • getConsumptionQuantity

        public static double getConsumptionQuantity()
                                             throws Exception

        Retrieves the amount of MBs processed.

        Returns:
        consumption quantity
        Throws:
        Exception
        Exception
      • getConsumptionCredit

        public static double getConsumptionCredit()
                                           throws Exception

        Gets the consumption credit.

        Returns:
        consumption quantity
        Throws:
        Exception
      • reportUsageInBytes

        public static void reportUsageInBytes(long bytesLength)
      • reportCreditsUsage

        public static void reportCreditsUsage(long usedCredits)
      • increaseBytesCount

        public static void increaseBytesCount(double bytesCount)
        Increase customer consumption file size
        Parameters:
        bytesCount - bytes count
      • increaseCreditsByOne

        public static void increaseCreditsByOne()
        Increase customer consumption credit.