Obtaining License Manager Information

Declare Variables/Constants

String CONTACT_SERVER = "localhost";
Attribute attrAppContext = null;
ApplicationContext appContext = null;
String pcScopeServerInfo = "<sentinelScope/>";

API Calls

To obtain License Manager 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 serverInfo = appContext.getInfo(pcScopeServerInfo, LicensingConstants. SNTL_QUERY_SERVER_INFO_VERSION("1.0")) ;

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

NOTE   In the use case described above, Server Info is obtained when the contact server is set. For rest of the attributes, default values will be returned.