Proxy Floating
The ProxyFloatingService is intended to be used with the on-premise Floating Server and is part of the Floating Client module.
Initializing the Proxy Floating Client module
At the minimum there are three parameters you will need to initialize the SDK:
apiKey, your company API keysharedKey, company-specific encryption key, used when signing requestsproductCode, an alphanumeric code identifying a specific product
The productCode is tied to a specific product the license applies to and is defined while creating the product.
Optional Configuration parameters for initializing the Floating Client SDK:
addShutdownHookindicates if you want the SDK to automatically release any currently active licenses on the device before you shut down the runtime process. Default is true.enablePeriodicRegisterenables periodic calls to register method to prolong the license usage. It will be prolonged every time the license has passed half of its floating timeout time. Usage time is set through the LicenseSpring platform with thefloatingTimeoutparameter in the product configurationproxyRegisterSubscribersubscriber on periodic register, default implementation isIgnoreRegisterEventSubscriber, but you can add your own implementation to handle theonSuccessandonErrorof the periodic register. This, of course, isn't a parameter you need to worry about if you chose not to enable periodic checks.requestLoggingrequest logging for debug purposes, default is no request logging.appVersionmanually set the version of the application that's using the SDK.enableRetryingenables the retry option on failed API call to the server. The call can be repeated for up to 4 times. Default is falseidentityProviderset a customIdentityProviderwhich generates unique keys for a particular device. Default implementation is based onONCE_PER_PROCESS. More details on our Java Hardware (Device) IDsrequestTimeoutset the timeout of requests make to API (in seconds), default is 10 seconds
ProxyFloatingService
After setting up the SDK configuration, there are a number of methods and objects available to the app developer.
To make the ProxyFloatingService, initialize it by passing the ProxyConfiguration object you set up earlier.
Now you can use the methods that the ProxyFloatingService provides.
register()
Registers the user by making a ProxyRequest which contains the product code from the ProxyConfiguration and the device ID which is provided by the IdentityProvider. Each registration lasts for the time specified in the LicenseSpring platform (floating timeout). In order to prolong the usage of the product, this method needs to be called periodically (this is automatically called in the background if the property enablePeriodicRegister in the ProxyConfiguration was set to true). Returns the LicenseData object which contains information about the license.
unregister()
Unregisters the user, which by definition, frees up one user slot on the server. Returns true if the action was successful.
getLicense()
Fetches the license information from the server for the product specified in the ProxyConfiguration object.
getSettings()
Retrievers the server settings. The returned Settings object contains registrationExpiryMinutes, and an array of server addresses.
pingServer()
Pings the local proxy server.
Last updated
Was this helpful?