Class EngineConfigAdapter
java.lang.Object
com.blackrook.engine.adapter.EngineConfigAdapter
- All Implemented Interfaces:
EngineConfig
Adapter class for engine configs.
Without overriding, this config does the following:
- Application name is null.
- Application version is null.
- Application icon is null.
- Application support E-mail is null.
- Application contact E-mail is null.
- Application support homepage is null.
- Application support page is null.
- Package roots is empty.
- Startup component class list is empty.
- Global setting path is empty.
- User setting path is empty.
- Global variables file path is empty.
- User variables file path is empty.
- Log file path is empty.
- Log level is INFO.
- File system stack is empty.
- File system archive list is empty.
- File system archive extension autoload is empty.
- Resource definition file is empty.
- Updates per second is null (no ticker).
- Debug mode is false.
- List of console commands to execute is empty.
- Author:
- Matthew Tropiano
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionString[]Gets the list of console commands to execute after startup.booleanString[]Gets the file system archives to mount.String[]Gets the list of directory paths to add in lowest to greatest stack precedence.Gets the file system extension for archive types to mount.Returns the directory path for storing global configuration.Returns the file off of the global directory path for storing/reading archived variables.Returns the file to log console output to (other than the console itself).String[]String[]Gets the list of singleton classes that should be instantiated on startup.Gets how many updates per second that the main updating thread needs to do.Returns the directory path for storing user configuration.Returns the file off of the user directory path for storing/reading archived variables.
-
Constructor Details
-
EngineConfigAdapter
public EngineConfigAdapter()
-
-
Method Details
-
getApplicationName
- Specified by:
getApplicationNamein interfaceEngineConfig- Returns:
- the application name. Can be null.
-
getApplicationVersion
- Specified by:
getApplicationVersionin interfaceEngineConfig- Returns:
- the application version string. Can be null.
-
getApplicationIcon
- Specified by:
getApplicationIconin interfaceEngineConfig- Returns:
- the icon used for the application. Can be null.
-
getApplicationSupportEmail
- Specified by:
getApplicationSupportEmailin interfaceEngineConfig- Returns:
- the e-mail address used for support. Can be null.
-
getApplicationContactEmail
- Specified by:
getApplicationContactEmailin interfaceEngineConfig- Returns:
- the e-mail address used for general contact. Can be null.
-
getApplicationHomepage
- Specified by:
getApplicationHomepagein interfaceEngineConfig- Returns:
- the URL for the application homepage. Can be null.
-
getApplicationSupportPage
- Specified by:
getApplicationSupportPagein interfaceEngineConfig- Returns:
- the e-mail address used for general contact. Can be null.
-
getPackageRoots
- Specified by:
getPackageRootsin interfaceEngineConfig- Returns:
- the package root name for scanning stuff in the engine application classpath.
-
getStartupComponentClasses
Description copied from interface:EngineConfigGets the list of singleton classes that should be instantiated on startup. Their dependencies are also loaded. All names do not need full qualification. If null, all classes are loaded.- Specified by:
getStartupComponentClassesin interfaceEngineConfig- Returns:
- an array of singleton classes to load.
-
getGlobalSettingsPath
Description copied from interface:EngineConfigReturns the directory path for storing global configuration. NOTE: This is OUTSIDE of the file system path.- Specified by:
getGlobalSettingsPathin interfaceEngineConfig- Returns:
- the global settings path root.
-
getUserSettingsPath
Description copied from interface:EngineConfigReturns the directory path for storing user configuration. NOTE: This is OUTSIDE of the file system path.- Specified by:
getUserSettingsPathin interfaceEngineConfig- Returns:
- the user settings path root.
-
getGlobalVariablesFile
Description copied from interface:EngineConfigReturns the file off of the global directory path for storing/reading archived variables. If null, saves/reads nothing.- Specified by:
getGlobalVariablesFilein interfaceEngineConfig- Returns:
- the filename to store global variables in.
- See Also:
-
getUserVariablesFile
Description copied from interface:EngineConfigReturns the file off of the user directory path for storing/reading archived variables. If null, saves/reads nothing.- Specified by:
getUserVariablesFilein interfaceEngineConfig- Returns:
- the filename to store user variables in.
- See Also:
-
getLogFile
Description copied from interface:EngineConfigReturns the file to log console output to (other than the console itself). NOTE: This is OUTSIDE of the file system path.- Specified by:
getLogFilein interfaceEngineConfig- Returns:
- the filename of the log.
-
getLogLevel
- Specified by:
getLogLevelin interfaceEngineConfig- Returns:
- the base logging level for the logging factory.
-
getFileSystemStack
Description copied from interface:EngineConfigGets the list of directory paths to add in lowest to greatest stack precedence. If empty, these directories are not added. This is consulted ifEngineConfig.getFileSystemArchives()returns an empty value.- Specified by:
getFileSystemStackin interfaceEngineConfig- Returns:
- the paths to push onto the filesystem stack.
- See Also:
-
getFileSystemArchives
Description copied from interface:EngineConfigGets the file system archives to mount. Files are considered to be ZIP formatted. If null, does not load specific archive types. Archives are loaded in order specified in the array. NOTE: If this is not empty, loading via FileSystemStack is ignored.- Specified by:
getFileSystemArchivesin interfaceEngineConfig- Returns:
- the array of archive paths off of the mounted filesystem.
- See Also:
-
getFileSystemStackArchiveAutoloadExtension
Description copied from interface:EngineConfigGets the file system extension for archive types to mount. Files are considered to be ZIP formatted. If empty, does not auto-load archive types. Archives are loaded in lexicographical order.- Specified by:
getFileSystemStackArchiveAutoloadExtensionin interfaceEngineConfig- Returns:
- the archive file extension or null to not auto-load archives.
- See Also:
-
getUpdatesPerSecond
Description copied from interface:EngineConfigGets how many updates per second that the main updating thread needs to do. If the returned value is 0 or less, this runs full bore. If this returnsnullthe updater is not started.- Specified by:
getUpdatesPerSecondin interfaceEngineConfig- Returns:
- the updates per second of the main ticker.
-
getDebugMode
public boolean getDebugMode()- Specified by:
getDebugModein interfaceEngineConfig- Returns:
- if this Engine should start in debug mode.
-
getConsoleCommandsToExecute
Description copied from interface:EngineConfigGets the list of console commands to execute after startup. If empty, nothing happens.- Specified by:
getConsoleCommandsToExecutein interfaceEngineConfig- Returns:
- a list of console commands to execute after startup.
-