Package app.supernaut

Interface BackgroundApp

All Known Subinterfaces:
MicronautContextAware
All Known Implementing Classes:
NoopBackgroundApp

public interface BackgroundApp
A background application that is started before the foreground app and can communicate with the foreground app. The background application is started before the UI toolkit is initialized and can make its first network requests simultaneously with loading the UI toolkit and the foreground UI application. In the JavaFX implementation this is an alternative to the PreLoader, which was essentially designed for applications that start synchronously. In an asynchronous/reactive JavaFX application the primaryStage should be displayed immediately and updated with data as data becomes available. The important thing is that network requests be sent as soon as possible after main is called.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Override to do any (hopefully minimal and quick) initialization that you want to happen before the ForegroundApp is started
    void
    Override this to create your own background threads and do any longer-duration initialization or start network I/O, etc.
    default void
    Override to get called when the application is stopping.
  • Method Details

    • init

      default void init()
      Override to do any (hopefully minimal and quick) initialization that you want to happen before the ForegroundApp is started
    • start

      void start()
      Override this to create your own background threads and do any longer-duration initialization or start network I/O, etc.
    • stop

      default void stop()
      Override to get called when the application is stopping.