Class TagHistoryLicense
- java.lang.Object
-
- com.inductiveautomation.gateway.tags.history.module.TagHistoryLicense
-
- All Implemented Interfaces:
LicenseStateUpdateListener
,java.util.EventListener
public class TagHistoryLicense extends java.lang.Object implements LicenseStateUpdateListener
This class is used to manage tag history licensing. The only tricky aspect of it is that due to historical reasons, it also checks a platform feature that allows tag history.There are static functions for retrieving state. However, it is better to use create() to get an instance, which will subscribe to various system, update the state, and cache it for better performance.
In 8.1, we decided to start protected all tag history functionality with the module. Historically, querying was free, and it can still be, but we should probably require a license in order to do it. We have introduced a new "limited" edition for that reason.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canQuery()
boolean
canStore()
static TagHistoryLicense
create(GatewayContext context)
I prefer this static creation in order to avoid implying the adding of listeners in the constructor.static boolean
isActive(GatewayContext context)
Returns whether tag history is available and not demo expired.void
licenseStateUpdated(LicenseStateUpdateEvent e)
The LicenseState for the module specified in the LicenseStateChangeEvent has been updated.protected void
refreshState()
void
shutdown()
-
-
-
Method Detail
-
create
public static TagHistoryLicense create(GatewayContext context)
I prefer this static creation in order to avoid implying the adding of listeners in the constructor. That is, it balances shutdown()
-
shutdown
public void shutdown()
-
canStore
public boolean canStore()
-
canQuery
public boolean canQuery()
-
licenseStateUpdated
public void licenseStateUpdated(LicenseStateUpdateEvent e)
Description copied from interface:LicenseStateUpdateListener
The LicenseState for the module specified in the LicenseStateChangeEvent has been updated. Module id of empty-string represents the license state for the Ignition platform itself.- Specified by:
licenseStateUpdated
in interfaceLicenseStateUpdateListener
- Parameters:
e
- The LicenseStateUpdateEvent
-
refreshState
protected void refreshState()
-
isActive
public static boolean isActive(GatewayContext context)
Returns whether tag history is available and not demo expired.
-
-