Class DevModeInitializer

java.lang.Object
com.vaadin.base.devserver.startup.DevModeInitializer
All Implemented Interfaces:
Serializable

public class DevModeInitializer extends Object implements Serializable
Initializer for starting node updaters as well as the dev mode server.

For internal use only. May be renamed or removed in a future release.

Since:
8.0
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates the initializer.
  • Method Summary

    Modifier and Type
    Method
    Description
    static File
    getServletResourceOutputDirectory(com.vaadin.flow.server.AbstractConfiguration configuration)
    Gets the folder that the development mode build writes the files to that the server reads back from the class path, such as the list of @JsStringFallback interfaces.
    static com.vaadin.flow.internal.DevModeHandler
    initDevModeHandler(Set<Class<?>> classes, com.vaadin.flow.server.VaadinContext context, Executor taskExecutor)
    Initialize the devmode server if not in production mode or compatibility mode.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DevModeInitializer

      public DevModeInitializer()
      Creates the initializer.
  • Method Details

    • getServletResourceOutputDirectory

      public static File getServletResourceOutputDirectory(com.vaadin.flow.server.AbstractConfiguration configuration)
      Gets the folder that the development mode build writes the files to that the server reads back from the class path, such as the list of @JsStringFallback interfaces. It is in the folder the build tool puts resources into, target/classes for Maven and build/resources/main for Gradle, since only that one is on the class path of the running application.
      Parameters:
      configuration - the configuration of the application, not null
      Returns:
      the folder, not null
    • initDevModeHandler

      public static com.vaadin.flow.internal.DevModeHandler initDevModeHandler(Set<Class<?>> classes, com.vaadin.flow.server.VaadinContext context, Executor taskExecutor) throws com.vaadin.flow.server.startup.VaadinInitializerException
      Initialize the devmode server if not in production mode or compatibility mode.
      Parameters:
      classes - classes to check for npm- and js modules
      context - VaadinContext we are running in
      taskExecutor - the executor to use for asynchronous execution
      Returns:
      the initialized dev mode handler or null if none was created
      Throws:
      com.vaadin.flow.server.startup.VaadinInitializerException - if dev mode can't be initialized
      Since:
      24.7