Class ComponentModelDelegate

    • Constructor Detail

      • ComponentModelDelegate

        protected ComponentModelDelegate​(Component component)
    • Method Detail

      • getScriptCallableMethods

        public final java.util.Set<java.lang.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​(java.lang.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