Hi,
is possible to check (within a java module) the Ignition server license status (that is, not for a specific module but for the Ignition server as a whole)? A client will use a HASP licensing mechanism for their Ignition server. (Another question we have is, does license go to trial mode immediately after extracting the USB HASP? -we assume it works that way) . If there’s no class/method available for getting the Ignition server license status (as a whole), I guess we would need to do it indirectly (for example by checking status for a specific non-free module). Thanks in advance!
You can query the LicenseManager, available from the GatewayContext, for the current licensing and trial state. When a HASP key is pulled out it should be detected within ~60 seconds.
Thanks for your response Kevin. I had checked GatewayContext’s LicenseManager but (please correct me if I’m wrong) it seems it allows to query license status for current module (or for a specific given module, using getLicenseState, which receives moduleId). Does it allow also to query server’s license status (and if so, which method should be called)? getLicense() returns License object which doesn’t seem to have a direct method to get the trial state. Or should I use for example LicenseManager.getDemoCountdownState() and compare it, say, against DemoCountdownState.AllInDemo or DemoCountdownState.SomeInDemo to conclude server as a whole is in trial mode? Please advise. Thanks in advance.
Looks like you’ll probably need to do a few things:
-
If you can get a non-null License object then you can assume some license is installed.
-
From that License, you can get the platform LicenseDetails as well as the LicenseDetails for any module included on the license.
-
If you want to know about trial expirations, you need to either add a LicenseStateUpdateListener or just query it directly from the LicenseManager for any module you’re interested in knowing the trial state for. Despite the fact that the listener/querying is per-module id, the demo timer is shared between all modules.