public class Metered extends Metered
Provides methods which allow to activate product with Metered license and retrieve amount of MBs processed. Learn more about Metered licenses at https://purchase.groupdocs.com/faqs/licensing/metered.
Constructor and Description |
---|
Metered() |
Modifier and Type | Method and Description |
---|---|
static double |
getConsumptionQuantity()
Retrieves amount of MBs processed.
|
void |
setMeteredKey(String publicKey,
String privateKey)
Activates product with Metered keys.
|
getConsumptionCredit, increaseBytesCount, increaseCreditsByOne
public static double getConsumptionQuantity() throws Exception
Retrieves amount of MBs processed.
Example:
Following example 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();
Exception
public void setMeteredKey(String publicKey, String privateKey) throws Exception
Activates product with Metered keys.
Example:
Following example demonstrates how to activate product with Metered keys.
String publicKey = "Public Key";
String privateKey = "Private Key";
Metered metered = new Metered();
metered.setMeteredKey(publicKey, privateKey);
setMeteredKey
in class Metered
publicKey
- The public key.privateKey
- The private key.Exception
Copyright © 2019. All rights reserved.