Metered
Inheritance: java.lang.Object
public class Metered
Provides methods for applying Metered license.
Learn more
Constructor | Description |
---|---|
Metered() | Initializes a new instance of this class. |
Methods
Method | Description |
---|---|
setMeteredKey(String publicKey, String privateKey) | Activates product with Metered keys. |
getConsumptionQuantity() | Retrieves amount of MBs processed. |
getConsumptionCredit() | Retrieves count of credits consumed. |
increaseBytesCount(double length) | |
increaseCreditsByBytesCount(double length) | |
increaseCreditsByOne() |
Metered()
public Metered()
Initializes a new instance of this class.
setMeteredKey(String publicKey, String privateKey)
public final void setMeteredKey(String publicKey, String privateKey)
Activates product with Metered keys.
Parameters:
Parameter | Type | Description |
---|---|---|
publicKey | java.lang.String | public key |
privateKey | java.lang.String | private key |
getConsumptionQuantity()
public static double getConsumptionQuantity()
Retrieves amount of MBs processed.
Returns: double - consumption quantity
getConsumptionCredit()
public static double getConsumptionCredit()
Retrieves count of credits consumed.
Returns: double - consumption credit
increaseBytesCount(double length)
public static void increaseBytesCount(double length)
Parameters:
Parameter | Type | Description |
---|---|---|
length | double |
increaseCreditsByBytesCount(double length)
public static void increaseCreditsByBytesCount(double length)
Parameters:
Parameter | Type | Description |
---|---|---|
length | double |
increaseCreditsByOne()
public static void increaseCreditsByOne()