Class EventStreamGatewayHook

java.lang.Object
com.inductiveautomation.ignition.gateway.model.AbstractGatewayModuleHook
com.inductiveautomation.eventstream.gateway.EventStreamGatewayHook
All Implemented Interfaces:
GatewayModuleHook

public class EventStreamGatewayHook extends AbstractGatewayModuleHook
  • Constructor Details

    • EventStreamGatewayHook

      public EventStreamGatewayHook()
  • Method Details

    • setup

      public void setup(GatewayContext context)
      Description copied from interface: GatewayModuleHook
      Called before register. The module can create data structures, loggers, etc. The module should not reach out to other parts of the system and expect them to be ready or created yet.
    • startup

      public void startup(LicenseState activationState)
      Description copied from interface: GatewayModuleHook
      Called to initialize the module. Will only be called once. Persistence interface is available, but only in read-only mode.
    • shutdown

      public void shutdown()
      Description copied from interface: GatewayModuleHook
      Called to shutdown this module. Note that this instance will never be started back up - a new one will be created if a restart is desired
    • notifyLicenseStateChanged

      public void notifyLicenseStateChanged(LicenseState licenseState)
      Description copied from interface: GatewayModuleHook
      Notify module hook when the license state has changed. This could only contain changes for the module or it could contain a change to the platform license (version, restrictions such as expiration date, sqltag count...)
      Specified by:
      notifyLicenseStateChanged in interface GatewayModuleHook
      Overrides:
      notifyLicenseStateChanged in class AbstractGatewayModuleHook
    • initializeScriptManager

      public void initializeScriptManager(ScriptManager manager)
      Description copied from interface: GatewayModuleHook
      Initialize a newly-instantiated script manager. This will be called exactly once for any given ScriptManager instance. Usually this will involve calling 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.

      This function may be called before GatewayModuleHook.startup(LicenseState), but never before GatewayModuleHook.setup(GatewayContext).

      Specified by:
      initializeScriptManager in interface GatewayModuleHook
      Overrides:
      initializeScriptManager in class AbstractGatewayModuleHook
    • getRpcImplementation

      public Optional<GatewayRpcImplementation> getRpcImplementation()
      Description copied from interface: GatewayModuleHook
      Returns the RPC implementation for this module, if any. This is the recommended way to expose RPC functions to the Designer or Vision Client if required. The return value will be cached for the lifetime of the Gateway.
      Specified by:
      getRpcImplementation in interface GatewayModuleHook
      Overrides:
      getRpcImplementation in class AbstractGatewayModuleHook
      See Also:
    • mountRouteHandlers

      public void mountRouteHandlers(RouteGroup routes)
      Description copied from interface: GatewayModuleHook
      Provides a chance for the module to mount any route handlers it wants. These will be active at /main/data/module-id/* See RouteGroup for details. Will be called after startup().
    • getMountPathAlias

      public Optional<String> getMountPathAlias()
      Description copied from interface: GatewayModuleHook
      Used by the mounting underneath /res/module-id/* and /data/module-id/* as an alternate mounting path instead of your module id, if present.
    • getMountedResourceFolder

      public Optional<String> getMountedResourceFolder()
      Returns:
      the path to a folder in one of the module's gateway jar files that should be mounted at /res/module-id/foldername
    • isMakerEditionCompatible

      public boolean isMakerEditionCompatible()
      Returns:
      true if this module opts-in to participating in Ignition Maker Edition. Default is false. If you override this and return true, your module will become activated when running in a Maker Edition installation.
    • get

      public static EventStreamGatewayHook get(GatewayContext context)