Obtaining Cumulative Trial License Usage Information

Declare Variables/Constants

String FEATURE_NAME = "FeatureTrial";
String FEATURE_VERSION = "1.0";
String CONTACT_SERVER = "localhost";
String ScopeTrialUsageInfo="<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+
      "<feature index=\"0\">"+
Attribute attrAppContext = null;
ApplicationContext appContext = null;

API Calls

To obtain cumulative trial license usage information, execute the APIs in the specified sequential order only:

>attrAppContext = new Attribute();


NOTE   If instead the LSFORCEHOST or LSHOST environment variables are set, then the above-mentioned steps are not required.

>appContext = new ApplicationContext(attrAppContext);

>String trialUsageInfo = appContext.getInfo(ScopeTrialUsageInfo, LicensingConstants. SNTL_QUERY_FEATURE_CUMULATIVE_TRIAL_INFO_VERSION("1.0"));

If the appContext.getInfo call is successful, the trialUsageInfo string contains an XML-based output having the detailed information.


>In the use case described above, a license is being requested from the local system when the License Manager is running on the same system as the client application (set as localhost). You can change the CONTACT_SERVER constant to the IP address or hostname of the system hosting the Sentinel RMS License Manager. For example,


>In the case of standalone licensing, set the contact server as no-net:

String CONTACT_SERVER = "no-net";