Class LauncherSettings
java.lang.Object
com.codingchili.core.configuration.system.LauncherSettings
- All Implemented Interfaces:
Configurable,Serializable
Contains the settings for the launcher.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionblocks()deployable(Class service)Sets the given service class as the default block to be deployed.getHosts()getPath()Get the path of a loaded configuration file.hosts()booleanbooleansetApplication(String application)setClustered(boolean clustering)voidsetConfigurationDirectory(String configurationDirectory)setVersion(String version)setWarnOnDefaultsLoaded(boolean warnOnDefaultsLoaded)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.codingchili.core.configuration.Configurable
save, serialize, setPath
-
Constructor Details
-
LauncherSettings
public LauncherSettings()
-
-
Method Details
-
getPath
Description copied from interface:ConfigurableGet the path of a loaded configuration file.- Specified by:
getPathin interfaceConfigurable- Returns:
- the directory path to the configuration file.
-
getVersion
- Returns:
- the launcher version.
-
setVersion
- Parameters:
version- sets the launcher version.- Returns:
- fluent
-
isWarnOnDefaultsLoaded
public boolean isWarnOnDefaultsLoaded()- Returns:
- true if a warning should be logged when a configuration file is not found and the configurable is loaded from the java class. To avoid these errors add your java configurable to the Configuration.
-
setWarnOnDefaultsLoaded
- Parameters:
warnOnDefaultsLoaded- set to true to disable warnings when default settings are loaded. Default settings will be loaded when the path to a configurable is not available.- Returns:
- fluent
-
getBlocks
- Returns:
- get the configured deployment blocks.
-
setBlocks
- Parameters:
blocks- set the configured deployment blocks.- Returns:
- fluent
-
getBlock
- Parameters:
block- name of the block to retrieve- Returns:
- a list of services attached to the block
-
addBlock
- Parameters:
name- the name of the service block to addblocks- a list of nodes to be deployed- Returns:
- fluent
-
getHosts
- Returns:
- a list of hosts mapped to blocks.
-
setHosts
- Parameters:
hosts- sets the host to block mapping.- Returns:
- fluent
-
addHost
- Parameters:
host- the host that should be mapped to a service blockblock- the block that the host should be mapped to- Returns:
- fluent
-
getConfigurationDirectory
- Returns:
- the path to the configuration directory to use.
-
setConfigurationDirectory
- Parameters:
configurationDirectory- the path to the configuration directory to use.
-
getApplication
- Returns:
- the configured application name.
-
setApplication
- Parameters:
application- set the name of the application.- Returns:
- fluent
-
hosts
- Returns:
- a list of hosts mapped to blocks.
-
blocks
- Returns:
- names of blocks, each with a list of services attached.
-
deployable
Sets the given service class as the default block to be deployed.- Parameters:
service- the service to be deployed- Returns:
- fluent
-
isClustered
public boolean isClustered()- Returns:
- true if clustering is enabled.
-
setClustered
- Parameters:
clustering- enables or disables clustering.- Returns:
- fluent
-
getAuthor
- Returns:
- author string used in startup text.
-
setAuthor
- Parameters:
author- set the author string visible in the startup text.- Returns:
- the author of the application
-