Class Application
java.lang.Object
be.yildizgames.common.application.Application
This class will:
Configure any new application (logger,...).
Display a banner.
Manage application update.
- Author:
- Grégory Van den Borre
-
Method Summary
Modifier and TypeMethodDescriptionfinal ApplicationaddBannerLine(BannerLine line) Add a line to the banner.final voidTo call once the application is started, this will close the splashscreen.final Propertiesstatic Applicationfinal Applicationstart()Initialize and start the application.final ApplicationInitialize and start the application by using a starter.final ApplicationwithBanner(Banner banner) To set a custom banner, the banner will be displayed in the console interface when starting the application.final ApplicationwithConfiguration(String[] args, Properties defaultConfig) final ApplicationwithConfiguration(String[] args, Properties defaultConfig, be.yildizgames.common.configuration.ConfigurationNotFoundAdditionalBehavior behavior) final ApplicationwithSplashScreen(SplashScreenProvider splashScreen) final ApplicationwithUpdate(String url) Provide the update mechanism.final ApplicationwithUpdate(String url, int timeout)
-
Method Details
-
prepare
-
withConfiguration
public final Application withConfiguration(String[] args, Properties defaultConfig, be.yildizgames.common.configuration.ConfigurationNotFoundAdditionalBehavior behavior) -
withBanner
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
-
addBannerLine
Add a line to the banner.- Parameters:
line- Line to add.- Returns:
- This object for chaining.
-
withConfiguration
-
withUpdate
Provide the update mechanism.- Parameters:
url- Url to call to get the update manifest.- Returns:
- This object for chaining.
-
withUpdate
-
start
Initialize and start the application.- Returns:
- This object for chaining.
-
start
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
-