Metered
Contents
[
Hide
]
Inheritance: java.lang.Object
public final class Metered
Provides methods to set metered key.
In this example, an attempt will be made to set metered public and private key
The component jar file:
Metered matered = new Metered();
matered.setMeteredKey("PublicKey", "PrivateKey");
Constructors
Constructor | Description |
---|---|
Metered() | Initializes a new instance of this class. |
Methods
Method | Description |
---|---|
setMeteredKey(String publicKey, String privateKey) | Sets metered public and private key |
clearMeteredLicense() | Cleans metered license |
flush() | Flushes count data on the server. |
getConsumptionQuantity() | Gets consumption file size |
getConsumptionCredit() | Gets consumption credit |
Metered()
public Metered()
Initializes a new instance of this class.
setMeteredKey(String publicKey, String privateKey)
public void setMeteredKey(String publicKey, String privateKey)
Sets metered public and private key
Parameters:
Parameter | Type | Description |
---|---|---|
publicKey | java.lang.String | public key |
privateKey | java.lang.String | private key |
clearMeteredLicense()
public static void clearMeteredLicense()
Cleans metered license
flush()
public static void flush()
Flushes count data on the server. Used only for debug purposes.
getConsumptionQuantity()
public static double getConsumptionQuantity()
Gets consumption file size
Returns: double - consumption quantity
getConsumptionCredit()
public static double getConsumptionCredit()
Gets consumption credit
Returns: double - consumption quantity