Module org.wildfly.plugin.core
Package org.wildfly.plugin.tools.server
Class Configuration<T extends Configuration<T>>
java.lang.Object
org.wildfly.plugin.tools.server.Configuration<T>
- Direct Known Subclasses:
DomainConfiguration,StandaloneConfiguration
The configuration used when starting a server.
- Author:
- James R. Perkins
-
Method Summary
Modifier and TypeMethodDescriptionaddEnvironmentVariable(String key, String value) Adds an environment variable to the process being created.Adds the environment variables to the process being created.client(org.jboss.as.controller.client.ModelControllerClient client) Sets the client to use for the server manager.static StandaloneConfigurationcreate(org.wildfly.core.launcher.BootableJarCommandBuilder commandBuilder) Creates a standalone configuration to launch a standalone server via the bootable JAR.static DomainConfigurationcreate(org.wildfly.core.launcher.DomainCommandBuilder commandBuilder) Creates a domain configuration to launch a domain serverstatic StandaloneConfigurationcreate(org.wildfly.core.launcher.StandaloneCommandBuilder commandBuilder) Creates a standalone configuration to launch a standalone server.Sets the working directory for the process created.Sets the working directory for the process created.Sets the working directory for the process created.managementAddress(String managementAddress) The management address to use for the client if the client has not been set.managementPort(int managementPort) The management port to use for the client if the client has not been set.redirectError(File file) Redirects the error stream of the process to a file.redirectError(ProcessBuilder.Redirect destination) Redirects the error stream of the process to the destination provided.redirectErrorStream(boolean redirectErrorStream) Set totrueif the error stream should be redirected to the output stream.redirectOutput(File file) Redirects the output of the process to a file.redirectOutput(ProcessBuilder.Redirect destination) Redirects the output of the process to the destination provided.redirectOutput(Path path) Redirects the output of the process to a file.shutdownOnClose(boolean shutdownOnClose)
-
Method Details
-
create
public static StandaloneConfiguration create(org.wildfly.core.launcher.StandaloneCommandBuilder commandBuilder) Creates a standalone configuration to launch a standalone server.- Parameters:
commandBuilder- the standalone command builder used to launch the server- Returns:
- a new standalone configuration
-
create
public static StandaloneConfiguration create(org.wildfly.core.launcher.BootableJarCommandBuilder commandBuilder) Creates a standalone configuration to launch a standalone server via the bootable JAR.- Parameters:
commandBuilder- the bootable JAR command builder used to launch the server- Returns:
- a new standalone configuration
-
create
public static DomainConfiguration create(org.wildfly.core.launcher.DomainCommandBuilder commandBuilder) Creates a domain configuration to launch a domain server- Parameters:
commandBuilder- the domain command builder used to launch the server- Returns:
- a new domain configuration
-
client
Sets the client to use for the server manager.If the the server manager is closed, the client will also be closed.
- Parameters:
client- the client to use to communicate with the server- Returns:
- this configuration
-
managementAddress
The management address to use for the client if the client has not been set.- Parameters:
managementAddress- the management address, default islocalhost- Returns:
- this configuration
-
managementPort
The management port to use for the client if the client has not been set.- Parameters:
managementPort- the management port, default is9990- Returns:
- this configuration
-
shutdownOnClose
- Parameters:
shutdownOnClose-trueto shutdown the server when the server manager is closed- Returns:
- this configuration
-
redirectErrorStream
Set totrueif the error stream should be redirected to the output stream.- Parameters:
redirectErrorStream-trueto merge the error stream into the output stream, otherwisefalseto keep the streams separate- Returns:
- the Configuration
-
redirectOutput
Redirects the output of the process to a file.- Parameters:
file- the file to redirect the output to- Returns:
- the Configuration
- See Also:
-
redirectOutput
Redirects the output of the process to a file.- Parameters:
path- the path to redirect the output to- Returns:
- the Configuration
- See Also:
-
redirectOutput
Redirects the output of the process to the destination provided.- Parameters:
destination- the output destination- Returns:
- the Configuration
- See Also:
-
redirectError
Redirects the error stream of the process to a file.- Parameters:
file- the file to redirect the error stream to- Returns:
- the Configuration
- See Also:
-
redirectError
Redirects the error stream of the process to the destination provided.- Parameters:
destination- the error stream destination- Returns:
- the Configuration
- See Also:
-
directory
Sets the working directory for the process created.- Parameters:
path- the path to the working directory- Returns:
- the Configuration
- See Also:
-
directory
Sets the working directory for the process created.- Parameters:
dir- the working directory- Returns:
- the Configuration
- See Also:
-
directory
Sets the working directory for the process created.- Parameters:
dir- the working directory- Returns:
- the Configuration
- See Also:
-
addEnvironmentVariable
Adds an environment variable to the process being created. If the key or value isnull, the environment variable will not be added.- Parameters:
key- they key for the variablevalue- the value for the variable- Returns:
- the Configuration
- See Also:
-
addEnvironmentVariables
Adds the environment variables to the process being created. Note thatnullkeys or values will not be added.- Parameters:
env- the environment variables to add- Returns:
- the Configuration
- See Also:
-