Package com.aspose.tasks
Class Metered
- java.lang.Object
-
- com.aspose.tasks.Metered
-
public class Metered extends Object
Provides methods to set metered key.
In this example, an attempt will be made to set metered public and private key
[C#] Metered metered = new Metered(); metered.SetMeteredKey("PublicKey", "PrivateKey"); [Visual Basic] Dim metered As Metered = New Metered metered.SetMeteredKey("PublicKey", "PrivateKey")
the component jar file: Metered metered = new Metered(); metered.setMeteredKey("PublicKey", "PrivateKey");
-
-
Constructor Summary
Constructors Constructor Description Metered()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BigDecimal
getConsumptionCredit()
Gets consumption credit.static BigDecimal
getConsumptionQuantity()
Gets consumption file size.void
resetMeteredKey()
Removes previously setup license.void
setMeteredKey(String publicKey, String privateKey)
Sets metered public and private keys.
-
-
-
Method Detail
-
getConsumptionCredit
public static BigDecimal getConsumptionCredit() throws Exception
Gets consumption credit.
- Returns:
- Returns the number of consumed credit points.
- Throws:
Exception
-
getConsumptionQuantity
public static BigDecimal getConsumptionQuantity() throws Exception
Gets consumption file size.
- Returns:
- Returns the number of consumed bytes.
- Throws:
Exception
-
resetMeteredKey
public final void resetMeteredKey()
Removes previously setup license.
-
setMeteredKey
public final void setMeteredKey(String publicKey, String privateKey) throws Exception
Sets metered public and private keys.
- Parameters:
publicKey
- The public key.privateKey
- The private key.
If you purchase metered license, this API should be called on application startup, normally, this is enough. However, if metered fails to upload consumption data during 24 hours period, the license will be set to evaluation status. To avoid such case, you should regularly check the license status If it is evaluation status, call this API again.- Throws:
Exception
-
-