Module io.helidon
Package io.helidon

Class Main


public class Main extends Object
Main entry point for any Helidon application. ServiceLoader is used to discover the correct HelidonStartupProvider to start the application (probably either Helidon Injection based application, or a CDI based application).

The default option is to start Helidon injection based application.

  • Method Details

    • main

      public static void main(String[] args)
      Start Helidon. This method is required to start directly from a command line.
      args - arguments of the application
    • addShutdownHandler

      public static void addShutdownHandler(HelidonShutdownHandler handler)
      Add shutdown handler to the list of handlers to be executed on shutdown.

      On shutdown, the handlers are executed in Weighted order, starting with the highest weight.

      handler - to execute
    • removeShutdownHandler

      public static void removeShutdownHandler(HelidonShutdownHandler handler)
      Remove a shutdown handler from the list of handlers.
      handler - handler to remove, must be the same instance registered with addShutdownHandler(io.helidon.spi.HelidonShutdownHandler)