public abstract class AbstractClientModuleHook extends java.lang.Object implements ClientModuleHook
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 and Description |
---|
AbstractClientModuleHook() |
Modifier and Type | Method and Description |
---|---|
void |
configureDeserializer(XMLDeserializer deserializer)
Called when an XMLDeserializer is created.
|
void |
configureFunctionFactory(ExpressionFunctionManager factory)
Provides the module with an opportunity to define its own expression functions
|
void |
initializeScriptManager(ScriptManager manager)
Initialize a newly-instantiated script manager.
|
void |
notifyActivationStateChanged(LicenseState licenseState)
Notifies this client module that it's license state has changed.
|
void |
shutdown()
Called when the module is shut down.
|
void |
startup(ClientContext context,
LicenseState activationState)
The main entrypoint for the module hook.
|
public void startup(ClientContext context, LicenseState activationState) throws java.lang.Exception
ClientModuleHook
ClientModuleHook.shutdown()
will be called and a new hook will be instantiatedstartup
in interface ClientModuleHook
java.lang.Exception
- if the module was not able to be initialized for the given project.public void shutdown()
ClientModuleHook
shutdown
in interface ClientModuleHook
public void configureDeserializer(XMLDeserializer deserializer)
ClientModuleHook
configureDeserializer
in interface ClientModuleHook
public void notifyActivationStateChanged(LicenseState licenseState)
ClientModuleHook
notifyActivationStateChanged
in interface ClientModuleHook
public void initializeScriptManager(ScriptManager manager)
ClientModuleHook
ScriptManager.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.initializeScriptManager
in interface ClientModuleHook
public void configureFunctionFactory(ExpressionFunctionManager factory)
ClientModuleHook
configureFunctionFactory
in interface ClientModuleHook