java.lang.Object
io.helidon.Main
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 Summary
Modifier and TypeMethodDescriptionstatic voidaddShutdownHandler(HelidonShutdownHandler handler) Add shutdown handler to the list of handlers to be executed on shutdown.static voidStart Helidon.static voidRemove a shutdown handler from the list of handlers.
-
Method Details
-
main
Start Helidon. This method is required to start directly from a command line.- Parameters:
args- arguments of the application
-
addShutdownHandler
Add shutdown handler to the list of handlers to be executed on shutdown.On shutdown, the handlers are executed in
Weightedorder, starting with the highest weight.- Parameters:
handler- to execute
-
removeShutdownHandler
Remove a shutdown handler from the list of handlers.- Parameters:
handler- handler to remove, must be the same instance registered withaddShutdownHandler(io.helidon.spi.HelidonShutdownHandler)
-