public class Metered extends Object
Provides methods for applying Metered license.
| Constructor and Description |
|---|
Metered() |
| Modifier and Type | Method and Description |
|---|---|
static BigDecimal |
getConsumptionCredit()
Retrieves count of credits consumed.
|
static BigDecimal |
getConsumptionQuantity()
Retrieves amount of MBs processed.
|
void |
setMeteredKey(String publicKey,
String privateKey)
Activates product with Metered keys.
|
public static BigDecimal getConsumptionCredit() throws Exception
Retrieves count of credits consumed.
Following example 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();
Exceptionpublic static BigDecimal getConsumptionQuantity() throws Exception
Retrieves amount of MBs processed.
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();
Exceptionpublic final void setMeteredKey(String publicKey, String privateKey)
Activates product with Metered keys.
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);
publicKey - The public key.privateKey - The private key.Copyright © 2024. All rights reserved.