LmAdminContext Class

An LmAdminContext object contains the configuration settings that should be used by the API calls made using that LmAdminContext context object. The class also initializes and allocates resources necessary for the Sentinel RMS LmAdminContext library.

Constructors

Syntax Description

LmAdminContext ()

Default constructor. Creates the LmAdminContext object.

LmAdminContext(String server_name, int server_port)

Creates an object of the LmAdminContext class for the specified server name and server port. Name of the contact server to be specified as NULL, localhost, or loopback address. By default, 'localhost' is used.

LmAdminContext(String server_name, int server_port, LmAdminAttribute attribute)

Creates an object of the LmAdminContext class for the specified server name and server port.
It also takes an LmAdminAttribute.

Attributes

The following table provides details about attributes that can be set as a part of the constructor:

Attribute for... Key and Description
Setting the Network Timeout Interval

> Attribute Key - SNTL_ATTR_LMADMINCONTEXT_NETWORK_TIMEOUT

>This attribute is used for setting the network timeout interval (in seconds) for communication between the admin application and the License Manager. For example, an admin application sends a request to the License Manager and the License Manager does not respond. In this scenario, error SNTL_ LMADMIN_NO_SERVER_RUNNING is returned, after the application has waited for the interval period that is set.

>These timeouts are different from the broadcast timeouts.

>The default value of interval is 30 seconds.

API

Modifier and Type API
String get(String scope, String query)
throws LmAdminException, UnsupportedEncodingException
String post(String input)
throws LmAdminException, UnsupportedEncodingException
void dispose()
throws LmAdminException

For the complete list of error and result codes related to Unified API functions, click the following links:

>Licensing Library Error and Result Codes

>License Parsing Error and Result Codes

>Lease Job Synchronization Error and Result Codes