Package org.wildfly.core.embedded.spi
Class EmbeddedProcessBootstrapConfiguration
- java.lang.Object
-
- org.wildfly.core.embedded.spi.EmbeddedProcessBootstrapConfiguration
-
public final class EmbeddedProcessBootstrapConfiguration extends Object
Configuration information forstartingaBootstrappedEmbeddedProcess.
-
-
Constructor Summary
Constructors Constructor Description EmbeddedProcessBootstrapConfiguration(String[] cmdArgs, Consumer<Integer> systemExitCallback)Create a new @code EmbeddedProcessBootstrapConfiguration}.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]getCmdArgs()Gets the arguments to pass to the process, analogous to what would be passed from the command line to amainmethod.FilegetJBossHome()Gets the file to use as the root dir of the managed process.org.jboss.modules.ModuleLoadergetModuleLoader()Gets the module loader to provide to the process bootstrap.Map<String,String>getSystemEnv()Gets the environment values to pass to the embedded process.Consumer<Integer>getSystemExitCallback()Gets the consumer to invoke if a system exit is being processed.PropertiesgetSystemProperties()Gets the properties to pass to the embedded process as if they were system properties.voidsetJBossHome(File jbossHome)Sets the file to use as the root dir of the managed process.voidsetModuleLoader(org.jboss.modules.ModuleLoader moduleLoader)Sets the module loader to provide to the process bootstrap.voidsetSystemEnv(Map<String,String> systemEnv)Sets the environment values to pass to the embedded process.voidsetSystemProperties(Properties systemProperties)Sets the properties to pass to the embedded process as if they were system properties.
-
-
-
Constructor Detail
-
EmbeddedProcessBootstrapConfiguration
public EmbeddedProcessBootstrapConfiguration(String[] cmdArgs, Consumer<Integer> systemExitCallback)
Create a new @code EmbeddedProcessBootstrapConfiguration}.- Parameters:
cmdArgs- arguments to pass to the process, analogous to what would be passed from the command line to amainmethod. Cannot benull.systemExitCallback- function to call if a system exit is being handled. The consumer is passed the exit code. Cannot benull.
-
-
Method Detail
-
getCmdArgs
public String[] getCmdArgs()
Gets the arguments to pass to the process, analogous to what would be passed from the command line to amainmethod.- Returns:
- the arguments. Will not be
null.
-
getModuleLoader
public org.jboss.modules.ModuleLoader getModuleLoader()
Gets the module loader to provide to the process bootstrap.- Returns:
- the module loader. May be
null.
-
getSystemExitCallback
public Consumer<Integer> getSystemExitCallback()
Gets the consumer to invoke if a system exit is being processed.- Returns:
- the consumer. Will not be
null
-
getSystemProperties
public Properties getSystemProperties()
Gets the properties to pass to the embedded process as if they were system properties.- Returns:
- the properties. May be
null.
-
setModuleLoader
public void setModuleLoader(org.jboss.modules.ModuleLoader moduleLoader)
Sets the module loader to provide to the process bootstrap.- Parameters:
moduleLoader- the module loader. May benull.
-
setSystemProperties
public void setSystemProperties(Properties systemProperties)
Sets the properties to pass to the embedded process as if they were system properties.- Parameters:
systemProperties- the properties. May benull.
-
getSystemEnv
public Map<String,String> getSystemEnv()
Gets the environment values to pass to the embedded process.- Returns:
- the properties. May be
null.
-
setSystemEnv
public void setSystemEnv(Map<String,String> systemEnv)
Sets the environment values to pass to the embedded process.- Parameters:
systemEnv- the properties. May benull.
-
getJBossHome
public File getJBossHome()
Gets the file to use as the root dir of the managed process.- Returns:
- the root dir. May be
null.
-
setJBossHome
public void setJBossHome(File jbossHome)
Sets the file to use as the root dir of the managed process.- Parameters:
jbossHome- the root dir. May benull.
-
-