refresh (with attributes)
Interface Information
>This API belongs to SentinelLicensing.jar.
>The corresponding library is Sentinel RMS licensing library.
Description
Renews the license authorization by contacting the License Manager. This API also allows passing additional values for specific purposes at the time of renewing a license authorization. If no value is provided for an attribute, the default value is used.
Syntax
void refresh(Attribute attribute)
Parameters
Parameter | Description |
attribute [in] |
The attribute object. The attributes that can be set are described below. >If vendor usage data attribute consists of multiple words, each will be anonymized individually, only if they are separated using a space. In general, avoid specifying the same entry (or word) twice in the vendor usage data attribute as the "uniquely" anonymized data will be repeated. >The spaces in the vendor usage data attribute are replaced with underscores (_). Also, the keyword <an> itself is not anonymized and is replaced by an underscore (_) in the resulting usage log line record. >To complete the vendor usage data attribute anonymization process, the system administrator must have also allowed anonymity of user information (either by setting the LS_LOG_ANONYMITY environment variable or using the -log-anonymity License Manager start-up option). |
Attributes
The table below provides details about the attributes that can be set:
# | Attribute for... | Key and Description |
---|---|---|
1 | Setting the refresh units required |
Attribute Key - SNTL_ATTR_REFRESH_UNITS_REQUIRED Introduced in v9.2.0, this attribute is used for setting the new total number of license units required at the time of renewing a license authorization. >The License Manager verifies for the availability of requested number of units before allocation. •If the License Manager has sufficient units to renew as per the refresh call, it will reclaim the number of units issued previously (by setting the SNTL_ATTR_LOGIN_UNITS_REQUIRED key of the sntl_
licensing_login_attr call). A new login call with the new total number of license units is made. •If the number of license units available with the License Manager is less than the required number, the refresh call renews the existing number of units only (if any set using the SNTL_ATTR_LOGIN_UNITS_REQUIRED key of the login call). >You can specify a positive numeric value not exceeding INT_MAX. >From RMS v9.5, license hard limit up to 4,294,967,294 is supported. This is applicable to license version 20 and above. |
2 | Setting the vendor usage data |
>Attribute Key - SNTL_ATTR_REFRESH_VENDOR_USAGE_DATA >This attribute is used for setting the vendor data to be recorded in the usage log file. >You can specify a string consisting of up to 255 characters, including letters, numbers, and special characters and excluding number sign (#) and comma (,) as these are reserved characters. The following points are applicable to Sentinel RMS usage log only: >Only up to 100 characters are shown in the usage vendor log (even when a longer string is specified). >If vendor usage data attribute consists of multiple words, each will be anonymized individually, only if they are separated using a space. In general, avoid specifying the same entry (or word) twice in the vendor usage data attribute as the "uniquely" anonymized data will be repeated. >The spaces in the vendor usage data attribute are replaced with underscores (_). Also, the keyword <an> itself is not anonymized and is replaced by an underscore (_) in the resulting usage log line record. >To complete the vendor usage data attribute anonymization process, the system administrator must have also allowed anonymity of user information (either by setting the LS_LOG_ANONYMITY environment variable or using the -log-anonymity License Manager start-up option). NOTE The vendor usage data passed using this attribute will not be visible in the Vendor usage data report of the Sentinel Entitlement Management system. Use the SNTL_ATTR_LOGIN_VENDOR_USAGE_DATA attribute of the sntl_licensing_login_attr API for setting the vendor usage data in the report. This report is available for the SCL Add-on for RMS users only. The following points are applicable for SCL Add-on for RMS: >The entire string, with the maximum allowed length of 255 characters, is shown in the usage vendor log. >From RMS 9.7 onwards, this attribute will set vendor usage data for refresh API only and will not impact any later API calls. However, the refresh API may make two implicit entries for release and request when used with SNTL_ATTR_REFRESH_UNITS_REQUIRED attribute. These implicit entries will also have the same vendor usage data. |
3 | Setting the refresh usage count multiplier |
>Attribute Key - SNTL_ATTR_REFRESH_USAGE_COUNT_MULTIPLIER >This attribute is applicable to the Lease mode. >The value passed using this attribute is known as the refresh usage count multiplier. >The usage count value is defined by the vendor to calculate usage during a particular licensing session. Usually, each session consumes one count per a login-refresh-logout call sequence. At times, vendor may want to represent this consumption differently, then a usage count multiplier value can be specified—at the start of the session (login), update (refresh), and its end (logout). >For a particular session, login, refresh, and logout usage count values will be added (by Sentinel EMS end) to calculate the usage count multiplier for reports generation and billing purposes. >You can specify only positive numeric values, not exceeding INT_MAX, as the usage count multiplier. |
4 | Setting the grace switch time |
> Attribute Key - SNTL_ATTR_REFRESH_GRACE_SWITCH_TIME >This attribute is used for setting the time period (in seconds) after which the licensed application switches from the grace period mode to the network licensing mode. It sends periodic updates to the License Manager to check for the availability of licenses. >You can specify only positive numeric values, not exceeding INT_MAX. |
5 | Setting the challenge data |
> Attribute Key - SNTL_ATTR_REFRESH_CHALLENGE_DATA >This attribute is used for setting the challenge string data. >You can specify a string consisting of up to 30 alphanumeric characters. |
6 | Setting the challenge secret |
> Attribute Key - SNTL_ATTR_REFRESH_CHALLENGE_SECRET >This attribute is used for setting the index of the secret which would be used by the License manager for the challenge response mechanism. >This value may range from 1 to the number of secrets provided in the license. |
Exception Handling
If unsuccessful, throws LicensingException or UnsupportedEncodingException.