Class AbstractWildFlyInstalledLocalContainer
- java.lang.Object
-
- org.codehaus.cargo.util.log.LoggedObject
-
- org.codehaus.cargo.container.spi.AbstractContainer
-
- org.codehaus.cargo.container.spi.AbstractLocalContainer
-
- org.codehaus.cargo.container.spi.AbstractInstalledLocalContainer
-
- org.codehaus.cargo.container.wildfly.internal.AbstractWildFlyInstalledLocalContainer
-
- All Implemented Interfaces:
Container,InstalledLocalContainer,RunnableContainer,SpawnedContainer,LocalContainer,ScriptingCapableContainer,Loggable
- Direct Known Subclasses:
WildFly8xInstalledLocalContainer,WildFly9xInstalledLocalContainer
public abstract class AbstractWildFlyInstalledLocalContainer extends AbstractInstalledLocalContainer implements ScriptingCapableContainer
WildFly container implementation.
-
-
Constructor Summary
Constructors Constructor Description AbstractWildFlyInstalledLocalContainer(LocalConfiguration configuration)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaddRuntimeArgs(JvmLauncher java)Add command line arguments to the java command.protected voiddoStart(JvmLauncher java)Implementation ofRunnableContainer.start()that all containers extending this class must implement.protected voiddoStop(JvmLauncher java)Implementation ofRunnableContainer.stop()that all containers extending this class must implement.voidexecuteScript(List<ScriptCommand> configurationScript)Writes CLI configuration script.voidexecuteScriptFiles(List<String> scriptFilePaths)Executes CLI scripts.ContainerCapabilitygetCapability()protected FilegetConfigAdminDirectory()protected abstract StringgetDefaultName()StringgetName()protected voidsetProperties(JvmLauncher java)Set the properties on the JVM launcher.protected voidwaitForCompletion(boolean waitForStarting)Ping the WAR CPC to verify if the container is started or stopped.-
Methods inherited from class org.codehaus.cargo.container.spi.AbstractInstalledLocalContainer
addExtraClasspath, addExtraClasspath, addMemoryArguments, addSharedClasspath, addToolsJarToClasspath, createJvmLauncher, forceStopInternal, getExtraClasspath, getHome, getHttpUtils, getJavaHome, getJvmLauncherFactory, getResourceUtils, getSharedClasspath, getSystemProperties, getType, ifPresentAddPathToList, setExtraClasspath, setHome, setJvmLauncherFactory, setJvmToLaunchContainerIn, setLogger, setSharedClasspath, setSystemProperties, startInternal, stopInternal, verify
-
Methods inherited from class org.codehaus.cargo.container.spi.AbstractLocalContainer
executePostStartTasks, getConfiguration, getFileHandler, getOutput, getState, getTimeout, isAppend, restart, setAppend, setConfiguration, setFileHandler, setOutput, setState, setTimeout, start, stop, waitForPortShutdown, waitForStarting
-
Methods inherited from class org.codehaus.cargo.util.log.LoggedObject
getLogger
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.codehaus.cargo.container.LocalContainer
getConfiguration, getFileHandler, setConfiguration, setFileHandler
-
Methods inherited from interface org.codehaus.cargo.container.internal.RunnableContainer
getOutput, getTimeout, isAppend, restart, setAppend, setOutput, setTimeout, start, stop
-
-
-
-
Field Detail
-
version
protected String version
WildFly version.
-
-
Constructor Detail
-
AbstractWildFlyInstalledLocalContainer
public AbstractWildFlyInstalledLocalContainer(LocalConfiguration configuration)
-
-
Method Detail
-
getCapability
public ContainerCapability getCapability()
- Specified by:
getCapabilityin interfaceContainer- Returns:
- the
ContainerCapabilityof the container in term of ability to deploy such and such type ofDeployables (eg WAR, EAR, etc).
-
doStart
protected void doStart(JvmLauncher java) throws Exception
Implementation ofRunnableContainer.start()that all containers extending this class must implement.- Specified by:
doStartin classAbstractInstalledLocalContainer- Parameters:
java- the predefined JVM launcher to use to start the container- Throws:
Exception- if any error is raised during the container start
-
setProperties
protected void setProperties(JvmLauncher java)
Set the properties on the JVM launcher.- Parameters:
java- JVM launcher to set the properties on.
-
doStop
protected void doStop(JvmLauncher java) throws Exception
Implementation ofRunnableContainer.stop()that all containers extending this class must implement.- Specified by:
doStopin classAbstractInstalledLocalContainer- Parameters:
java- the predefined JVM launcher to use to stop the container- Throws:
Exception- if any error is raised during the container stop
-
executeScript
public void executeScript(List<ScriptCommand> configurationScript)
Writes CLI configuration script.- Specified by:
executeScriptin interfaceScriptingCapableContainer- Parameters:
configurationScript- Script containing CLI configuration to be executed.
-
executeScriptFiles
public void executeScriptFiles(List<String> scriptFilePaths)
Executes CLI scripts.- Specified by:
executeScriptFilesin interfaceScriptingCapableContainer- Parameters:
scriptFilePaths- List of file paths containing CLI scripts.
-
getName
public String getName()
-
getDefaultName
protected abstract String getDefaultName()
- Returns:
- Default name of the container, including the JBoss EAP version when relevant. For
example:
WildFly 10.x (JBoss EAP 7.0)
-
getConfigAdminDirectory
protected File getConfigAdminDirectory()
- Returns:
- Config admin directory.
-
addRuntimeArgs
protected void addRuntimeArgs(JvmLauncher java)
Add command line arguments to the java command.. As WildFly needs to have the runtime AFTER the arguments passed to the main class, we need to set the associated argument line when starting container (and not when initializing the JVM launcher).- Overrides:
addRuntimeArgsin classAbstractInstalledLocalContainer- Parameters:
java- The java command
-
waitForCompletion
protected void waitForCompletion(boolean waitForStarting) throws InterruptedExceptionPing the WAR CPC to verify if the container is started or stopped.- Overrides:
waitForCompletionin classAbstractLocalContainer- Parameters:
waitForStarting- iftruethen wait for container start, iffalsewait for container stop- Throws:
InterruptedException- if the thread sleep is interrupted
-
-