LexFloatClient
LexFloatClient is used in client applications to obtain floating licenses from LexFloatServer. It handles the process of requesting, renewing, and dropping license leases in your app. Before integrating LexFloatClient, make sure the LexFloatServer is installed, configured, and activated on your customer's network.
Minimum requirements
For the supported platforms, versions, and architectures, see minimum requirements.
Adding licensing to your app
Prerequisites
After you have added a product for your app in the admin portal, note its Product ID from the actions menu on the Products page. You will use this product ID in your code, and it must match the product ID configured in LexFloatServer.
For a complete, working integration, refer to the example project on GitHub.
Adding the library to your app
Requesting a floating license
Set the host product ID, the LexFloatServer address, and a callback for status notifications, then request a license lease from the server. Run this whenever the user starts the app or needs a new license.
Renewing a floating license
The license lease renews automatically in a background thread. Whenever it renews or fails to renew, your callback is invoked from that thread.
Dropping a floating license
When the user is done, free the license so it becomes available to others. If you don't, the license stays leased (a zombie) until the lease expires. Run this whenever the user closes the app.
Borrowing a license for offline use
Borrowing (also known as an offline floating license) lets a user keep using licensed functionality while disconnected from LexFloatServer, for a set duration after which it expires automatically. The LexFloatServer administrator caps the lease duration with maxOfflineLeaseDuration and the number of clients that can hold an offline lease at once with allowedOfflineFloatingClients, both in config.yml.
Call RequestOfflineFloatingLicense() with the lease duration the client wants to borrow for, up to that maximum. Check for an existing lease with HasFloatingLicense() before requesting one. The license stays valid while the user is disconnected and expires automatically when the duration elapses.
For how this fits the licensing model, see on-premise floating licenses.
Next steps
- See how the on-premise floating model works in On-Premise Floating Licenses.
- Query the server's status and leases with the LexFloatServer API endpoints.
Need more help?
If you need more help adding LexFloatClient to your app, we'll be glad to help you with the integration. Contact us through the contact page.