Class ComponentModelDelegate

java.lang.Object
com.inductiveautomation.ignition.common.lifecycle.AbstractLifecycle
com.inductiveautomation.perspective.gateway.api.ComponentModelDelegate
Direct Known Subclasses:
AlarmJournalTableModelDelegate, AlarmStatusTableModelDelegate, AudioModelDelegate, FileUploadModelDelegate, GoogleMapModelDelegate, MapModelDelegate, PdfViewerModelDelegate, PowerChartModelDelegate, ReportViewerModelDelegate, SignaturePadModelDelegate, TableModelDelegate, TagBrowseTreeModelDelegate

public abstract class ComponentModelDelegate extends AbstractLifecycle
A ComponentModelDelegate is created when its ComponentModel owner is created. The ComponentModelDelegate will be notified of startup and shutdown when the ComponentModel starts up and shuts down. This gives the ComponentModelDelegate the opportunity to interact with its ComponentModel.
  • Field Details

  • Constructor Details

    • ComponentModelDelegate

      protected ComponentModelDelegate(Component component)
  • Method Details

    • getScriptCallableMethods

      public final Set<String> getScriptCallableMethods()
      Returns:
      A set of the names of the methods of this class that are annotated with @ScriptCallable
    • handleEvent

      public void handleEvent(EventFiredMsg message)
      A event hook for the delegate. Invoked when a "model" event is fired over the websocket channel by the component's client side model delegate. Subclasses can choose if and how to handle incoming event messages.
      Parameters:
      message - EventFiredMsg An event fired message.
    • fireEvent

      public void fireEvent(String eventName, com.inductiveautomation.ignition.common.gson.JsonObject event)
      Fires a model event which is expected to be handled by the client side component model delegate. This makes it possible to communicate between Gateway and Client side ComponentModel delegates via websocket.
      Parameters:
      eventName - {String} The name of the event
      event - JsonObject The event payload as a json object