public abstract class AbstractInstalledContainerUtil extends Object implements ContainerUtil
| Modifier and Type | Field and Description |
|---|---|
protected String |
cargoLogFilePath
The path where the Cargo log files will be written to.
|
protected String |
configResourcesPath
The path where all configuration resource files are
|
protected String |
containerFile
The ZIP file of the container to use i.e.
|
protected String |
containerHome
The path where the installedLocalContainer server is installed.
|
protected Integer |
containerPort
The port where the container will run on.
|
protected List<DeployableLocationConfiguration> |
deployableLocationConfigurations
The deployable location configurations that will be used in the
integration tests.
|
protected Map<String,String> |
deployableLocations
The deployable locations that will be used in the integration tests.
|
protected org.codehaus.cargo.container.InstalledLocalContainer |
installedLocalContainer
The installedLocalContainer where the server application will be run in.
|
protected List<String> |
jvmArguments
The JVM arguments to use when starting up the installedLocalContainer
|
protected String |
remoteLocation
The URL where the container and configuration ZIP files are.
|
protected Map<String,String> |
systemProperties
The system property that can be set to be used in the JVM.
|
| Constructor and Description |
|---|
AbstractInstalledContainerUtil()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDeployableLocation(String location,
String type)
Adds a location of a deployable with the according type.
|
protected void |
cleanUpContainer()
Cleans up the container if there is any to make sure we start with a
fresh container.
|
protected abstract void |
deploy()
Deploys the application to the correct
|
String |
getConfigResourcesPath() |
Integer |
getContainerPort()
Retrieves the port where the container is running on.
|
List<String> |
getJvmArguments()
Retrieves the JVM arguments
|
void |
setCargoLogFilePath(String cargoLogFilePath) |
void |
setConfigResourcesPath(String configResourcesPath) |
void |
setContainerFile(String containerFile) |
protected void |
setContainerName(String containerName) |
void |
setContainerPort(Integer containerPort) |
void |
setDeployableLocationConfigurations(List<DeployableLocationConfiguration> deployableLocationConfigurations) |
void |
setDeployableLocations(Map<String,String> deployableLocations) |
void |
setJvmArguments(List<String> jvmArguments) |
void |
setRemoteLocation(String remoteLocation) |
void |
setSystemProperties(Map<String,String> systemProperties) |
protected abstract void |
setupConfiguration()
Sets up the configuration needed for the deployable to be able to run
correctly.
|
protected void |
setupContainer()
Installs the container and the application configuration.
|
void |
start()
Starts up the installedLocalContainer and its deployed applications
|
void |
stop()
Stops the installedLocalContainer.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConfDirectory, getSharedLibDirectoryprotected String configResourcesPath
protected org.codehaus.cargo.container.InstalledLocalContainer installedLocalContainer
protected List<String> jvmArguments
protected String containerHome
protected Integer containerPort
protected String cargoLogFilePath
protected Map<String,String> systemProperties
protected String remoteLocation
protected String containerFile
protected Map<String,String> deployableLocations
protected List<DeployableLocationConfiguration> deployableLocationConfigurations
public AbstractInstalledContainerUtil()
protected void cleanUpContainer()
protected abstract void setupConfiguration()
throws Exception
Exception - Is thrown when something went wrong if the configuration
setup fails.protected void setupContainer()
throws Exception
Exception - Is thrown when something goes wrong during the setup of the
container.protected abstract void deploy()
public void start()
throws Exception
ContainerUtilstart in interface ContainerUtilException - Is thrown when something went wrong during start up.public void stop()
ContainerUtilstop in interface ContainerUtilpublic void setConfigResourcesPath(String configResourcesPath)
configResourcesPath - the configResourcesPath to setpublic String getConfigResourcesPath()
public void setDeployableLocations(Map<String,String> deployableLocations)
deployableLocations - the deployableLocations to setpublic void setDeployableLocationConfigurations(List<DeployableLocationConfiguration> deployableLocationConfigurations)
locations - the deployable configuration locations that will be set.public void addDeployableLocation(String location, String type)
ContainerUtiladdDeployableLocation in interface ContainerUtillocation - The location where to get the deployable.type - The type of deployable. This can be one of the following
three:
public Integer getContainerPort()
ContainerUtilgetContainerPort in interface ContainerUtilpublic void setSystemProperties(Map<String,String> systemProperties)
systemProperties - the systemProperties to setpublic List<String> getJvmArguments()
public void setJvmArguments(List<String> jvmArguments)
jvmArguments - the jvmArguments to setpublic void setCargoLogFilePath(String cargoLogFilePath)
public void setContainerPort(Integer containerPort)
containerPort - the containerPort to setpublic void setRemoteLocation(String remoteLocation)
remoteLocation - the remoteLocation to setpublic void setContainerFile(String containerFile)
containerFile - the containerFile to setprotected void setContainerName(String containerName)
containerName - the containerName to setCopyright © 2014 Tranquilized Quality. All rights reserved.