Class AbstractClientModuleHook
java.lang.Object
com.inductiveautomation.vision.api.client.AbstractClientModuleHook
- All Implemented Interfaces:
ClientModuleHook
- Direct Known Subclasses:
AbstractClientModuleHook,ModuleHook,ReportingClientHook,SFCClientHook
Base class for all client module hook implementations. All methods are given empty implementations. It is expected that subclasses will override any methods that they wish to give real implementations.
Best practice is to subclass this class rather than implement ClientModuleHook directly, so that when new
methods get added to the interface, your module automatically inherits an empty implementation of the new method
rather than breaking with a NoSuchMethodError.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigureDeserializer(XMLDeserializer deserializer) Called when an XMLDeserializer is created.voidProvides the module with an opportunity to define its own expression functionsAllows a module to create one or more id-bundlekey pairs that the module will use for role-based client security.voidinitializeScriptManager(ScriptManager manager) Initialize a newly-instantiated script manager.voidnotifyActivationStateChanged(LicenseState licenseState) Notifies this client module that its license state has changed.voidshutdown()Called when the module is shut down.voidstartup(ClientContext context, LicenseState activationState) The main entrypoint for the module hook.
-
Constructor Details
-
AbstractClientModuleHook
public AbstractClientModuleHook()
-
-
Method Details
-
startup
Description copied from interface:ClientModuleHookThe main entrypoint for the module hook. This will only be called once for a given project. If another project is ever opened,ClientModuleHook.shutdown()will be called and a new hook will be instantiated- Specified by:
startupin interfaceClientModuleHook- Throws:
Exception- if the module was not able to be initialized for the given project.
-
shutdown
public void shutdown()Description copied from interface:ClientModuleHookCalled when the module is shut down.- Specified by:
shutdownin interfaceClientModuleHook
-
configureDeserializer
Description copied from interface:ClientModuleHookCalled when an XMLDeserializer is created. Gives the module a chance to add custom deserialization delegates to the deserializer.- Specified by:
configureDeserializerin interfaceClientModuleHook
-
notifyActivationStateChanged
Description copied from interface:ClientModuleHookNotifies this client module that its license state has changed. Note that if the trial mode expires, the entire client will automatically time out, so client modules don't typically need to worry about trial mode.- Specified by:
notifyActivationStateChangedin interfaceClientModuleHook
-
initializeScriptManager
Description copied from interface:ClientModuleHookInitialize a newly-instantiated script manager. This will be called exactly once for any given ScriptManager instance. Usually this will involve callingScriptManager.addScriptModule(String, Object), which reflectively loads the public (instance and static) java functions from the given object into the scripting environment, at the provided path.- Specified by:
initializeScriptManagerin interfaceClientModuleHook
-
configureFunctionFactory
Description copied from interface:ClientModuleHookProvides the module with an opportunity to define its own expression functions- Specified by:
configureFunctionFactoryin interfaceClientModuleHook
-
createPermissionKeys
Description copied from interface:ClientModuleHookAllows a module to create one or more id-bundlekey pairs that the module will use for role-based client security.- Specified by:
createPermissionKeysin interfaceClientModuleHook- Returns:
- Map of id-bundlekey entries. May be null or empty.
-