com.groupdocs.watermark.legacy

Interfaces

Classes

Exceptions

com.groupdocs.watermark.legacy

Class Metered



  • public class Metered
    extends Object
    Provides methods to license the component with Metered license.

    Lean more

    The following example demonstrates demonstrates how to activate product with Metered keys.

    string publicKey = "Public Key";
       string privateKey = "Private Key";
    
       Metered metered = new Metered();
       metered.setMeteredKey(publicKey, privateKey);
     
    • Constructor Detail

      • Metered

        public Metered()
        Initializes a new instance of the Metered class.
    • Method Detail

      • setMeteredKey

        public void setMeteredKey(String publicKey,
                         String privateKey)
                           throws Exception
        Activates product with Metered keys.
        Parameters:
        publicKey - The public key.
        privateKey - The private key.
        Throws:
        Exception
      • getConsumptionQuantity

        public static double getConsumptionQuantity()
                                             throws Exception
        Retrieves amount of MBs processed.

        The following example demonstrates demonstrates how to retrieve amount of MBs processed.

        string publicKey = "Public Key";
           string privateKey = "Private Key";
        
           Metered metered = new Metered();
           metered.setMeteredKey(publicKey, privateKey);
         
           double mbProcessed = Metered.getConsumptionQuantity();
         
        Returns:
        The amount of MBs processed.
        Throws:
        Exception
      • getConsumptionCredit

        public static double getConsumptionCredit()
                                           throws Exception
        Retrieves count of credits consumed.

        The following example demonstrates demonstrates how to retrieve count of credits consumed.

        string publicKey = "Public Key";
           string privateKey = "Private Key";
        
           Metered metered = new Metered();
           metered.setMeteredKey(publicKey, privateKey);
         
           double creditsConsumed = Metered.getConsumptionCredit();
         
        Returns:
        The count of credits consumed.
        Throws:
        Exception