Metered
Leave feedback
On this page
Inheritance: java.lang.Object
public class Metered
Provides methods to work with metered licensing. In this example, an attempt to set metered public and private keys is made:
Metered metered = new Metered();
metered.setMeteredKey("PublicKey", "PrivateKey");
| Constructor | Description |
|---|---|
| Metered() | Creates a new instance of this class. |
| Method | Description |
|---|---|
| setMeteredKey(String publicKey, String privateKey) | Enables metered licensing for the component by specifying appropriate public and private metered keys. |
| getConsumptionQuantity() | Returns the currently consumed number of megabytes. |
| getConsumptionCredit() | Returns the currently consumed number of credits. |
public Metered()
Creates a new instance of this class.
public void setMeteredKey(String publicKey, String privateKey)
Enables metered licensing for the component by specifying appropriate public and private metered keys.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| publicKey | java.lang.String | The public metered key. |
| privateKey | java.lang.String | The private metered key. |
public static double getConsumptionQuantity()
Returns the currently consumed number of megabytes.
Returns: double - The currently consumed number of megabytes.
public static double getConsumptionCredit()
Returns the currently consumed number of credits.
Returns: double - The currently consumed number of credits.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.