Class EventEmitter

java.lang.Object
com.vaadin.swingkit.server.EventEmitter
All Implemented Interfaces:
EmbeddedBrowserJSCaller

public abstract class EventEmitter extends Object implements EmbeddedBrowserJSCaller
Abstract class to be extended by embedded browsers implementations to emit asynchronous events from Vaadin side to Swing side. It implements EmbeddedBrowserJSCaller interface.
Author:
Vaadin Ltd
  • Constructor Details

    • EventEmitter

      public EventEmitter()
  • Method Details

    • emit

      public void emit(VaadinSwingEvent event) throws EmbeddedBrowserException
      Method to emit a VaadinSwingEvent from a Vaadin view that will be received by the JVaadinPanel hosting the view on the Swing app. Handler of this event has to be implemented on the Swing app and can recognize the event using getType
      Parameters:
      event - The VaadinSwingEvent emitted
      Throws:
      EmbeddedBrowserException - Thrown if no SwingKit embedded browser is detected.
    • checkContext

      protected com.vaadin.flow.component.page.PendingJavaScriptResult checkContext()
    • executeQuery

      protected com.vaadin.flow.component.page.PendingJavaScriptResult executeQuery()