Class Configuration.Builder
- java.lang.Object
-
- org.wildfly.core.embedded.Configuration.Builder
-
- Enclosing interface:
- Configuration
public static class Configuration.Builder extends Object
A builder for creating the configuration
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Configuration.BuilderaddCommandArgument(String arg)Adds a command argument.Configuration.BuilderaddCommandArguments(String... args)Adds the arguments to the command line arguments,Configuration.BuilderaddSystemPackage(String systemPackage)Adds a system package for the module loader.Configuration.BuilderaddSystemPackages(String... systemPackages)Adds the system packages for the module loader.Configurationbuild()Creates a new immutable configuration.static Configuration.Builderof(File jbossHome)Creates a new builder for the configuration.static Configuration.Builderof(Path jbossHome)Creates a new builder for the configuration.Configuration.BuildersetCommandArguments(String... args)Sets the command line arguments replacing any previously set arguments.Configuration.BuildersetLoggerHint(Configuration.LoggerHint loggerHint)Sets a hint for the JBoss Logging facade on which log manager the loggers so delegate to.Configuration.BuildersetModuleLoader(org.jboss.modules.ModuleLoader moduleLoader)Sets the module loader.Configuration.BuildersetModulePath(String modulePath)Sets the path to the modules for the server.Configuration.BuildersetSystemPackages(String... systemPackages)Sets the system packages for the module loader.
-
-
-
Method Detail
-
of
public static Configuration.Builder of(File jbossHome)
Creates a new builder for the configuration.- Parameters:
jbossHome- the servers home directory
-
of
public static Configuration.Builder of(Path jbossHome)
Creates a new builder for the configuration.- Parameters:
jbossHome- the servers home directory
-
addCommandArgument
public Configuration.Builder addCommandArgument(String arg)
Adds a command argument.- Parameters:
arg- the argument to add, ifnullthe argument is ignored- Returns:
- this builder
-
addCommandArguments
public Configuration.Builder addCommandArguments(String... args)
Adds the arguments to the command line arguments,- Parameters:
args- the arguments to add, ifnullthe argument is ignored- Returns:
- this builder
-
setCommandArguments
public Configuration.Builder setCommandArguments(String... args)
Sets the command line arguments replacing any previously set arguments.- Parameters:
args- the arguments to set, ifnullthe arguments are cleared- Returns:
- this builder
-
setLoggerHint
public Configuration.Builder setLoggerHint(Configuration.LoggerHint loggerHint)
Sets a hint for the JBoss Logging facade on which log manager the loggers so delegate to.Sets the
org.jboss.logging.providersystem property and adds the hinted logging module to the list of system packages.- Parameters:
loggerHint- the logger hint- Returns:
- this builder
-
setModuleLoader
public Configuration.Builder setModuleLoader(org.jboss.modules.ModuleLoader moduleLoader)
Sets the module loader. If the value isnulla default module loader will be configured and used.- Parameters:
moduleLoader- the module loader ornullto use the default- Returns:
- this builder
-
setModulePath
public Configuration.Builder setModulePath(String modulePath)
Sets the path to the modules for the server. Ifnullthe system propertymodule.pathwill be used if present. If the property is not present the modules directory will be determined from the servers home directory.Note that this value is only used if the module loader is
null. Also note that once the module loader is created changing this property, even for new configurations, will have no effect in the same JVM.- Parameters:
modulePath- the module path- Returns:
- this builder
-
addSystemPackage
public Configuration.Builder addSystemPackage(String systemPackage)
Adds a system package for the module loader.Note that this value is only used if the module loader is
null. Also note that once the module loader is created changing this property, even for new configurations, will have no effect in the same JVM.- Parameters:
systemPackage- the system package to add,nullvalues are ignored- Returns:
- this builder
-
addSystemPackages
public Configuration.Builder addSystemPackages(String... systemPackages)
Adds the system packages for the module loader.Note that this value is only used if the module loader is
null. Also note that once the module loader is created changing this property, even for new configurations, will have no effect in the same JVM.- Parameters:
systemPackages- the system packages to add,nullvalues are ignored- Returns:
- this builder
-
setSystemPackages
public Configuration.Builder setSystemPackages(String... systemPackages)
Sets the system packages for the module loader.Note that this value is only used if the module loader is
null. Also note that once the module loader is created changing this property, even for new configurations, will have no effect in the same JVM.- Parameters:
systemPackages- the system package to add,nullclears the previously set system packages- Returns:
- this builder
-
build
public Configuration build()
Creates a new immutable configuration.- Returns:
- the configuration
-
-