Class AbstractJavaSystemCommandExecuteBuilder
- java.lang.Object
-
- com.github.toolarium.system.command.builder.system.AbstractCommandExecuterBuilder
-
- com.github.toolarium.system.command.builder.java.AbstractJavaSystemCommandExecuteBuilder
-
- All Implemented Interfaces:
ISystemCommandExecuterBuilder
- Direct Known Subclasses:
JarSystemCommandExecuterBuilder,JavaSystemCommandExecuterBuilder
public abstract class AbstractJavaSystemCommandExecuteBuilder extends AbstractCommandExecuterBuilder
The abstract java system command executer builder
-
-
Constructor Summary
Constructors Constructor Description AbstractJavaSystemCommandExecuteBuilder(SystemCommandGroupList systemCommandGroupList)Constructor for AbstractJavaSystemCommandExecuteBuilder
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidchildBuild(SystemCommandGroupList systemCommandGroupList)Build the java commandAbstractJavaSystemCommandExecuteBuilderclassPath(java.lang.String classPath)Set the java executable to setAbstractJavaSystemCommandExecuteBuilderenvironmentVariable(java.lang.String key, java.lang.String value)Add an environment variableprotected voidfinalizeJavaExecutable()Finalize the java executableAbstractJavaSystemCommandExecuteBuilderinheritClassPath()Inherit class pathAbstractJavaSystemCommandExecuteBuilderinheritJre()Inherit jre pathAbstractJavaSystemCommandExecuteBuilderjavaAgent(java.lang.String javaAgent)Set the java agent to setAbstractJavaSystemCommandExecuteBuilderjavaExecutable(java.lang.String javaExecutable)Set the java executable to setAbstractJavaSystemCommandExecuteBuilderjavaHeadless()Set the java headlessprotected abstract java.lang.StringjavaMain()Get the java mainAbstractJavaSystemCommandExecuteBuilderjavaMemory(java.lang.String initialSize, java.lang.String maxSize)Set the java memory settingsAbstractJavaSystemCommandExecuteBuilderjavaTempPath(java.lang.String tempPath)Set the java temp pathAbstractJavaSystemCommandExecuteBuilderjavaUser(java.lang.String user)Set the jvm userAbstractJavaSystemCommandExecuteBuilderjrePath(java.lang.String jrePath)Set the jre pathAbstractJavaSystemCommandExecuteBuilderlock()Lock the current system command group list (default timeout).AbstractJavaSystemCommandExecuteBuilderlock(java.lang.Integer lockTimeoutInSeconds)Lock the current system command group list.AbstractJavaSystemCommandExecuteBuilderparameter(java.lang.String parameter)Add a program parameterAbstractJavaSystemCommandExecuteBuildershell(java.lang.String... shell)Set the shell of the current commandAbstractJavaSystemCommandExecuteBuildersystemProperty(java.lang.String key, java.lang.String value)Add a system propertyAbstractJavaSystemCommandExecuteBuildersystemProperty(java.lang.String key, java.lang.String value, boolean isSenstivieValue)Add a system propertyAbstractJavaSystemCommandExecuteBuilderuser(java.lang.String user)Set the user of the current commandAbstractJavaSystemCommandExecuteBuilderworkingPath(java.lang.String workingPath)Set the working path of the current command-
Methods inherited from class com.github.toolarium.system.command.builder.system.AbstractCommandExecuterBuilder
addSystemCommand, addSystemCommandGroup, build, command, command, command, command, equals, getProcessEnvironment, getSystemCommand, hashCode, onError, onSuccess, onSuccessOrError, pipe
-
-
-
-
Constructor Detail
-
AbstractJavaSystemCommandExecuteBuilder
public AbstractJavaSystemCommandExecuteBuilder(SystemCommandGroupList systemCommandGroupList)
Constructor for AbstractJavaSystemCommandExecuteBuilder- Parameters:
systemCommandGroupList- the system command group list
-
-
Method Detail
-
shell
public AbstractJavaSystemCommandExecuteBuilder shell(java.lang.String... shell)
Description copied from interface:ISystemCommandExecuterBuilderSet the shell of the current command- Specified by:
shellin interfaceISystemCommandExecuterBuilder- Overrides:
shellin classAbstractCommandExecuterBuilder- Parameters:
shell- the shell- Returns:
- the system command executer builder
- See Also:
ISystemCommandExecuterBuilder.shell(java.lang.String[])
-
user
public AbstractJavaSystemCommandExecuteBuilder user(java.lang.String user)
Description copied from interface:ISystemCommandExecuterBuilderSet the user of the current command- Specified by:
userin interfaceISystemCommandExecuterBuilder- Overrides:
userin classAbstractCommandExecuterBuilder- Parameters:
user- the user- Returns:
- the system command executer builder
- See Also:
ISystemCommandExecuterBuilder.user(java.lang.String)
-
workingPath
public AbstractJavaSystemCommandExecuteBuilder workingPath(java.lang.String workingPath)
Description copied from interface:ISystemCommandExecuterBuilderSet the working path of the current command- Specified by:
workingPathin interfaceISystemCommandExecuterBuilder- Overrides:
workingPathin classAbstractCommandExecuterBuilder- Parameters:
workingPath- the workingPath- Returns:
- the system command executer builder
- See Also:
ISystemCommandExecuterBuilder.workingPath(java.lang.String)
-
environmentVariable
public AbstractJavaSystemCommandExecuteBuilder environmentVariable(java.lang.String key, java.lang.String value)
Description copied from interface:ISystemCommandExecuterBuilderAdd an environment variable- Specified by:
environmentVariablein interfaceISystemCommandExecuterBuilder- Overrides:
environmentVariablein classAbstractCommandExecuterBuilder- Parameters:
key- the keyvalue- the value- Returns:
- the system command executer builder
- See Also:
ISystemCommandExecuterBuilder.environmentVariable(java.lang.String, java.lang.String)
-
jrePath
public AbstractJavaSystemCommandExecuteBuilder jrePath(java.lang.String jrePath)
Set the jre path- Parameters:
jrePath- the jre path- Returns:
- the java system command executer builder
-
inheritJre
public AbstractJavaSystemCommandExecuteBuilder inheritJre()
Inherit jre path- Returns:
- the java system command executer builder
-
javaExecutable
public AbstractJavaSystemCommandExecuteBuilder javaExecutable(java.lang.String javaExecutable)
Set the java executable to set- Parameters:
javaExecutable- the java executable to set- Returns:
- the java system command executer builder
-
inheritClassPath
public AbstractJavaSystemCommandExecuteBuilder inheritClassPath()
Inherit class path- Returns:
- the java system command executer builder
-
classPath
public AbstractJavaSystemCommandExecuteBuilder classPath(java.lang.String classPath)
Set the java executable to set- Parameters:
classPath- the java classpath to add- Returns:
- the java system command executer builder
-
javaAgent
public AbstractJavaSystemCommandExecuteBuilder javaAgent(java.lang.String javaAgent)
Set the java agent to set- Parameters:
javaAgent- the java agent to set- Returns:
- the java system command executer builder
-
javaMemory
public AbstractJavaSystemCommandExecuteBuilder javaMemory(java.lang.String initialSize, java.lang.String maxSize)
Set the java memory settings- Parameters:
initialSize- The initiali size in bytes, e.g. 512M. Sets the initial size of the Java heap. The default size is 2097152 (2MB). The values must be a multiple of, and greater than, 1024 bytes (1KB). (The -server flag increases the default size to 32M.). Sets the initial Java heap size for the Eden generation. The default value is 640K.maxSize- The max size in bytes, e.g. 4G. Sets the maximum size to which the Java heap can grow. The default size is 64M. (The -server flag increases the default size to 128M.)- Returns:
- the java system command executer builder
-
javaUser
public AbstractJavaSystemCommandExecuteBuilder javaUser(java.lang.String user)
Set the jvm user- Parameters:
user- the jvm user- Returns:
- the java system command executer builder
-
javaTempPath
public AbstractJavaSystemCommandExecuteBuilder javaTempPath(java.lang.String tempPath)
Set the java temp path- Parameters:
tempPath- the temp path- Returns:
- the java system command executer builder
-
javaHeadless
public AbstractJavaSystemCommandExecuteBuilder javaHeadless()
Set the java headless- Returns:
- the java system command executer builder
-
systemProperty
public AbstractJavaSystemCommandExecuteBuilder systemProperty(java.lang.String key, java.lang.String value)
Add a system property- Parameters:
key- the keyvalue- the value- Returns:
- the java system command executer builder
-
systemProperty
public AbstractJavaSystemCommandExecuteBuilder systemProperty(java.lang.String key, java.lang.String value, boolean isSenstivieValue)
Add a system property- Parameters:
key- the keyvalue- the valueisSenstivieValue- true if the value is sensitive- Returns:
- the java system command executer builder
-
parameter
public AbstractJavaSystemCommandExecuteBuilder parameter(java.lang.String parameter)
Add a program parameter- Parameters:
parameter- program parameter to add- Returns:
- the java system command executer builder
-
lock
public AbstractJavaSystemCommandExecuteBuilder lock()
Description copied from interface:ISystemCommandExecuterBuilderLock the current system command group list (default timeout).- Specified by:
lockin interfaceISystemCommandExecuterBuilder- Overrides:
lockin classAbstractCommandExecuterBuilder- Returns:
- the system command executer builder
- See Also:
ISystemCommandExecuterBuilder.lock()
-
lock
public AbstractJavaSystemCommandExecuteBuilder lock(java.lang.Integer lockTimeoutInSeconds)
Description copied from interface:ISystemCommandExecuterBuilderLock the current system command group list.- Specified by:
lockin interfaceISystemCommandExecuterBuilder- Overrides:
lockin classAbstractCommandExecuterBuilder- Parameters:
lockTimeoutInSeconds- the period in seconds- Returns:
- the system command executer builder
- See Also:
ISystemCommandExecuterBuilder.lock(java.lang.Integer)
-
childBuild
protected void childBuild(SystemCommandGroupList systemCommandGroupList) throws java.lang.IllegalArgumentException
Description copied from class:AbstractCommandExecuterBuilderBuild the java command- Specified by:
childBuildin classAbstractCommandExecuterBuilder- Parameters:
systemCommandGroupList- the- Throws:
java.lang.IllegalArgumentException- In case of an invalid argument- See Also:
AbstractCommandExecuterBuilder.childBuild(com.github.toolarium.system.command.dto.list.SystemCommandGroupList)
-
finalizeJavaExecutable
protected void finalizeJavaExecutable()
Finalize the java executable
-
javaMain
protected abstract java.lang.String javaMain()
Get the java main- Returns:
- the java main
- Throws:
java.lang.IllegalArgumentException- In case of an invalid input
-
-