Interface EventEmitter

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int emit​(String eventName, Object... args)
      Will trigger the event callback if any on the given event.
      void on​(String eventName, org.graalvm.polyglot.Value callback)
      Register a callback for an event.
    • Method Detail

      • on

        void on​(String eventName,
                org.graalvm.polyglot.Value callback)
        Register a callback for an event.
        Parameters:
        eventName - the event name
        callback - the action to perform
      • emit

        int emit​(String eventName,
                 Object... args)
        Will trigger the event callback if any on the given event.
        Parameters:
        eventName - the event.
        args - arguments to be passed
        Returns:
        callback arity