login

void login(ApplicationContext appCtx, String featureName, Attribute attribute)

This API is used to consume a license. It is used to log in to a feature and establish a session for license consumption. It also creates a usage log.

This API also allows passing additional values for specific purposes at the time of obtaining a license authorization.

NOTE   For information on which license to retrieve if the same feature exists in multiple entitlements of a customer, refer to the section Priority Logic for Feature Consumption.

Parameters

Parameter Description
appCtx [in] The application context object (that was initialized while initializing the licensing resources). You can set it to null.
featureName [in] Name of the feature for which the license is to be obtained from the Sentinel Cloud Connect.
attribute[in]

The key-value pairs of attributes to be used to obtain licenses from the Sentinel Cloud Connect. The attributes that can be set are described in the next section.

Attributes

The table below provides details about the attributes that can be set by using the LicensingConstants class:

Attribute for... Key and Description
Setting the feature version

> Attribute Key - SNTL_ATTR_LOGIN_FEATURE_VERSION

>Optional

>This attribute is used to provide the version associated with the feature for which the license is to be obtained (along with the input feature name).

Setting the login identity string

> Attribute Key - SNTL_ATTR_LOGIN_IDENTITY_STRING

>Mandatory

>This attribute is used for setting the string containing the identity information. This string is generated by using the serialize API of the Identity Class.

Setting the license units required

> Attribute Key - SNTL_ATTR_LOGIN_UNITS_REQUIRED

>Optional

>This attribute is used for setting the number of concurrent license units to be consumed in a login session.

>You can provide this attribute only when concurrency is unlimited. The allowed integer range is 1-2147483647. The 0 value is ignored. If this attribute is provided for licenses with limited concurrency, an error will be thrown.

>This attribute is used to calculate peak concurrency, which is retrieved by using the Peak Concurrency report (exposed as an EMS web service). For peak concurrency details, refer to the Sentinel EMS and RMS Solution Guide.

Setting the vendor usage data

> Attribute Key - SNTL_ATTR_LOGIN_VENDOR_USAGE_DATA

>Optional

>This attribute is used for recording vendor-specific data along with the licensed feature usage data.

>EMS allows generating the Vendor Usage Data Report based on this attribute. This report provides information about entitlements that contain the specified vendor information, along with customer details. The report data is grouped by the value of this attribute.

>The size is limited to 255 characters. If the provided string is greater than 255 characters, it is trimmed and the trimmed value is shown in the report.

Setting the usage count multiplier

> Attribute Key - SNTL_ATTR_LOGIN_USAGE_ COUNT_MULTIPLIER

>Optional

>This attribute is used to specify the number of usage count consumed in a login session.

>By default, a login-logout session consumes one usage count and this count is acknowledged during the login call. At times, a vendor may want to specify a count more than one, which can be specified at the start of the session (login), in-between the session (refresh), and/or at the end of the session (logout). To consume a usage count more than one for a given session, set the usage count multiplier.

NOTE   It is recommended not to use the logout API to pass usage count multiplier for licenses where the usage limit is defined.

>Its value can be any positive integer in the range of 1 to 2,147,483,647. The default value is 1 for the login API and 0 for the logout and refresh APIs.

>The total usage count for a particular session is calculated by adding the usage count multiplier values specified in the login, refresh, and logout APIs. By default, a login-refresh-logout combination consumes one (1+0+0) usage count.

>The usage count multiplier value is used for licenses where usage limit is defined. The usage count multiplier value cannot exceed the sum of usage limit and grace limit.

>The usage count consumed by a session is visible in all EMS reports.

Exception Handling

If unsuccessful, throws LicensingException.