java.lang.Object
be.yildizgames.common.application.Application

public class Application
extends Object
This class will: Configure any new application (logger,...). Display a banner. Manage application update.
Author:
Grégory Van den Borre
  • Method Details

    • prepare

      public static Application prepare​(String applicationName)
    • withConfiguration

      public final Application withConfiguration​(String[] args, Properties defaultConfig, be.yildizgames.common.configuration.ConfigurationNotFoundAdditionalBehavior behavior)
    • withBanner

      public final Application withBanner​(Banner banner)
      To set a custom banner, the banner will be displayed in the console interface when starting the application.
      Parameters:
      banner - Custom banner to set.
      Returns:
      This object for chaining.
    • withSplashScreen

      public final Application withSplashScreen​(SplashScreenProvider splashScreen)
    • addBannerLine

      public final Application addBannerLine​(BannerLine line)
    • withConfiguration

      public final Application withConfiguration​(String[] args, Properties defaultConfig)
    • withUpdate

      public final Application withUpdate​(String url)
      Provide the update mechanism.
      Parameters:
      url - Url to call to get the update manifest.
      Returns:
      This object for chaining.
    • withUpdate

      public final Application withUpdate​(String url, int timeout)
    • start

      public final Application start()
      Initialize and start the application.
      Returns:
      This object for chaining.
    • start

      public final Application start​(Starter starter)
      Initialize and start the application by using a starter. Provide support to log all uncaught exceptions.
      Parameters:
      starter - Starting application.
      Returns:
      This object for chaining.
    • applicationStarted

      public final void applicationStarted()
      To call once the application is started, this will close the splashscreen.
    • getConfiguration

      public final Properties getConfiguration()