public class BootableJarCommandBuilder extends Object implements CommandBuilder
| Modifier and Type | Method and Description |
|---|---|
BootableJarCommandBuilder |
addJavaOption(String jvmArg)
Adds a JVM argument to the command ignoring
null arguments. |
BootableJarCommandBuilder |
addJavaOptions(Iterable<String> javaOpts)
Adds the collection of JVM arguments to the command.
|
BootableJarCommandBuilder |
addJavaOptions(String... javaOpts)
Adds the array of JVM arguments to the command.
|
BootableJarCommandBuilder |
addSecurityProperties(Map<String,String> properties)
Adds all the security properties to be passed to the server.
|
BootableJarCommandBuilder |
addSecurityProperty(String key)
Adds a security property to be passed to the server with a
null value. |
BootableJarCommandBuilder |
addSecurityProperty(String key,
String value)
Adds a security property to be passed to the server.
|
BootableJarCommandBuilder |
addServerArgument(String arg)
Adds an argument to be passed to the server ignore the argument if
null. |
BootableJarCommandBuilder |
addServerArguments(Iterable<String> args)
Adds the arguments to the collection of arguments that will be passed to
the server ignoring any
null arguments. |
BootableJarCommandBuilder |
addServerArguments(String... args)
Adds the arguments to the collection of arguments that will be passed to
the server ignoring any
null arguments. |
List<String> |
build()
A list of commands, including a
java executable, required to launch WildFly
instance. |
List<String> |
buildArguments()
A list of command arguments required to launch WildFly instance.
|
Path |
getJavaHome()
Returns the Java home directory where the java executable command can be
found.
|
List<String> |
getJavaOptions()
Returns the JVM arguments.
|
List<String> |
getServerArguments()
A collection of server command line arguments.
|
static BootableJarCommandBuilder |
of(Path bootableJar)
Creates a command builder for a bootable instance of WildFly.
|
static BootableJarCommandBuilder |
of(String bootableJar)
Creates a command builder for a bootable instance of WildFly.
|
BootableJarCommandBuilder |
setBindAddressHint(String address)
Sets the system property
jboss.bind.address to the address given. |
BootableJarCommandBuilder |
setBindAddressHint(String interfaceName,
String address)
Sets the system property
jboss.bind.address.$INTERFACE to the
address given where $INTERFACE is the interfaceName
parameter. |
BootableJarCommandBuilder |
setDebug()
Sets the debug argument for the JVM with a default port of
8787. |
BootableJarCommandBuilder |
setDebug(boolean suspend,
int port)
Sets the debug JPDA remote socket debugging argument.
|
BootableJarCommandBuilder |
setDebug(int port)
Sets the debug argument for the JVM.
|
BootableJarCommandBuilder |
setInstallDir(Path installDir)
Set the directory to install the server.
|
BootableJarCommandBuilder |
setJavaHome(Path javaHome)
Sets the Java home where the Java executable can be found.
|
BootableJarCommandBuilder |
setJavaHome(String javaHome)
Sets the Java home where the Java executable can be found.
|
BootableJarCommandBuilder |
setJavaOptions(Iterable<String> javaOpts)
Sets the JVM arguments to use.
|
BootableJarCommandBuilder |
setJavaOptions(String... javaOpts)
Sets the JVM arguments to use.
|
BootableJarCommandBuilder |
setModulesLockless(boolean b)
Set to
true to use JBoss Modules lockless mode. |
BootableJarCommandBuilder |
setModulesMetrics(boolean b)
Set to
true to gather metrics for JBoss Modules. |
BootableJarCommandBuilder |
setMulticastAddressHint(String address)
Sets the system property
jboss.default.multicast.address to the
address given. |
public BootableJarCommandBuilder setInstallDir(Path installDir)
installDir - Installation directory.public List<String> getServerArguments()
public BootableJarCommandBuilder addServerArguments(String... args)
null arguments.args - the arguments to addpublic BootableJarCommandBuilder addServerArguments(Iterable<String> args)
null arguments.args - the arguments to addpublic BootableJarCommandBuilder addServerArgument(String arg)
null.arg - the argument to passpublic BootableJarCommandBuilder setBindAddressHint(String address)
jboss.bind.address to the address given.
This will override any previous value set via
addServerArgument(String).
Note: This option only works if the standard system property has
not been removed from the interface. If the system property was removed
the address provided has no effect.address - the address to set the bind address topublic BootableJarCommandBuilder setBindAddressHint(String interfaceName, String address)
jboss.bind.address.$INTERFACE to the
address given where $INTERFACE is the interfaceName
parameter. For example in the default configuration passing
management for the interfaceName parameter would result
in the system property jboss.bind.address.management being set to
the address provided.
This will override any previous value set via
addServerArgument(String).
Note: This option only works if the standard system property has
not been removed from the interface. If the system property was removed
the address provided has no effect.interfaceName - the name of the interface of the binding addressaddress - the address to bind the management interface topublic BootableJarCommandBuilder setMulticastAddressHint(String address)
jboss.default.multicast.address to the
address given.
This will override any previous value set via
addServerArgument(String).
Note: This option only works if the standard system property has
not been removed from the interface. If the system property was removed
the address provided has no effect.address - the address to set the multicast system property topublic static BootableJarCommandBuilder of(Path bootableJar)
bootableJar - the path to the bootable jarpublic static BootableJarCommandBuilder of(String bootableJar)
bootableJar - the path to the WildFly home directorypublic BootableJarCommandBuilder addJavaOption(String jvmArg)
null arguments.jvmArg - the JVM argument to addpublic BootableJarCommandBuilder addJavaOptions(String... javaOpts)
javaOpts - the array of JVM arguments to add, null arguments are ignoredpublic BootableJarCommandBuilder addJavaOptions(Iterable<String> javaOpts)
javaOpts - the collection of JVM arguments to add, null arguments are ignoredpublic BootableJarCommandBuilder setJavaOptions(Iterable<String> javaOpts)
null values in the collection.
If the collection is null the JVM arguments will be cleared and no new arguments will be added.javaOpts - the JVM arguments to usepublic BootableJarCommandBuilder setJavaOptions(String... javaOpts)
null values in the array.
If the array is null the JVM arguments will be cleared and no new arguments will be added.javaOpts - the JVM arguments to usepublic List<String> getJavaOptions()
public BootableJarCommandBuilder setDebug()
8787.public BootableJarCommandBuilder setDebug(int port)
port - the port to listen onpublic BootableJarCommandBuilder setDebug(boolean suspend, int port)
suspend - true to suspend otherwise falseport - the port to listen onpublic BootableJarCommandBuilder setJavaHome(String javaHome)
javaHome - the Java home or null to use te system property java.homepublic BootableJarCommandBuilder setJavaHome(Path javaHome)
javaHome - the Java home or null to use te system property java.homepublic BootableJarCommandBuilder setModulesLockless(boolean b)
true to use JBoss Modules lockless mode.b - true to use lockless modepublic BootableJarCommandBuilder setModulesMetrics(boolean b)
true to gather metrics for JBoss Modules.b - true to gather metrics for JBoss Modules.public BootableJarCommandBuilder addSecurityProperty(String key)
null value.key - the property keypublic BootableJarCommandBuilder addSecurityProperty(String key, String value)
key - the property keyvalue - the property valuepublic BootableJarCommandBuilder addSecurityProperties(Map<String,String> properties)
properties - a map of the properties to add, null values are allowed in the mappublic List<String> buildArguments()
CommandBuilderjava executable command.buildArguments in interface CommandBuilderpublic List<String> build()
CommandBuilderjava executable, required to launch WildFly
instance.build in interface CommandBuilderpublic Path getJavaHome()
java.home, should be used.Copyright © 2021 JBoss by Red Hat. All rights reserved.