Metered

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 metered = new Metered();
 	matered.setMeteredKey("PublicKey", "PrivateKey");

Constructors

ConstructorDescription
Metered()Initializes a new instance of this class.

Methods

MethodDescription
setMeteredKey(String publicKey, String privateKey)Sets metered public and private key
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:

ParameterTypeDescription
publicKeyjava.lang.Stringpublic key
privateKeyjava.lang.Stringprivate key

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