Binding a TLicenseUse to a TLicenseProvider

A TLicenseUse object is bound to a single TLicenseProvider object while it is performing a license request to that selected provider. If the request succeeds, the TLicenseUse object stays bound to the selected provider until either the TLicenseUse object is destroyed, or it initiates a Check which cannot manage to Allocate the requested units. Over its lifetime, a single TLicenseUse object can be bound to multiple TLicenseProvider objects, but these multiple bindings are serial; two bindings never exist simultaneously.

The provider keeps the context of the binding between the TLicenseUse object and its TLicenseProvider object in a TLicenseProviderSession object. Immediately after the TLicenseUse selects a provider, the provider is asked via CreateSession to construct a new TLicenseProviderSession object. The new object is held by the TLicenseUse until either the TLicenseUse object is destroyed or a request for units fails. In either case, TLicenseUse then destructs the TLicenseProviderSession.

The allocation request for units is directed by the TLicenseUse to the TLicenseProviderSession, as are requests to execute provider-specific operations. These requests are made via the Allocate and ExecuteOperations member functions of the TLicenseProviderSession, respectively. The session is responsible for maintaining the count of the allocated units, and provides access to that count via its GetNumberOfUnits and ConsumeUnits member functions.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker