Class Application
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 Summary
Modifier and Type Method Description ApplicationaddBannerLine(BannerLine line)voidapplicationStarted()To call once the application is started, this will close the splashscreen.PropertiesgetConfiguration()static Applicationprepare(String applicationName)Applicationstart()Initialize and start the application.Applicationstart(Starter starter)Initialize and start the application by using a starter.ApplicationwithBanner(Banner banner)To set a custom banner, the banner will be displayed in the console interface when starting the application.ApplicationwithConfiguration(String[] args, Properties defaultConfig)ApplicationwithConfiguration(String[] args, Properties defaultConfig, be.yildizgames.common.configuration.ConfigurationNotFoundAdditionalBehavior behavior)ApplicationwithSplashScreen(SplashScreenProvider splashScreen)ApplicationwithUpdate(String url)Provide the update mechanism.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
-
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
-