Interface EndpointHotSwapService


public interface EndpointHotSwapService
The service interface that defines the API for EndpointHotSwapService implementations.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.vaadin.flow.shared.Registration
    The method that enables registering HotSwapListeners to be notified whenever an EndpointChangedEvent is fired.
    void
    monitorChanges(Path buildDir, com.vaadin.flow.internal.BrowserLiveReload browserLiveReload)
    The method that starts the process for monitoring the changes in endpoints.
  • Method Details

    • monitorChanges

      void monitorChanges(Path buildDir, com.vaadin.flow.internal.BrowserLiveReload browserLiveReload)
      The method that starts the process for monitoring the changes in endpoints. The strategy for detecting the changes can be Polling, Watching the File System changes, etc. No matter what the strategy for detecting the changes is, instances of EndpointChangedEvent should be fired upon detecting changes in the endpoints and associated classes.
      Parameters:
      buildDir - the path to project's build directory which is 'target' in standard Maven projects and 'build' in standard Gradle projects.
      browserLiveReload - the BrowserLiveReload object which is used to reload the browser after any endpoint changes are detected.
      See Also:
    • addHotSwapListener

      com.vaadin.flow.shared.Registration addHotSwapListener(HotSwapListener listener)
      The method that enables registering HotSwapListeners to be notified whenever an EndpointChangedEvent is fired.
      Parameters:
      listener - an instance of HotSwapListener that implements the endpointChanged method that will be called when an EndpointChangedEvent is fired.
      Returns:
      the Listener Registration object that enables the cally to deregister the listener.