Class EventEmitterImpl

    • Constructor Detail

      • EventEmitterImpl

        public EventEmitterImpl()
    • Method Detail

      • on

        public void on​(String eventName,
                       org.graalvm.polyglot.Value callback)
        Description copied from interface: EventEmitter
        Register a callback for an event.
        Specified by:
        on in interface EventEmitter
        Parameters:
        eventName - the event name
        callback - the action to perform
      • emit

        public int emit​(String eventName,
                        Object... args)
        Description copied from interface: EventEmitter
        Will trigger the event callback if any on the given event.
        Specified by:
        emit in interface EventEmitter
        Parameters:
        eventName - the event.
        args - arguments to be passed
        Returns:
        callback arity