public abstract class AbstractInstalledLocalContainer extends AbstractLocalContainer implements InstalledLocalContainer
| Constructor and Description |
|---|
AbstractInstalledLocalContainer(LocalConfiguration configuration)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addToolsJarToClasspath(org.apache.tools.ant.types.Path classpath)
Adds the tools.jar to the classpath, except for Mac OSX as it is not
needed.
|
protected abstract void |
doStart(org.apache.tools.ant.taskdefs.Java java)
Implementation of
RunnableContainer.start() that all
containers extending this class must implement. |
protected abstract void |
doStop(org.apache.tools.ant.taskdefs.Java java)
Implementation of
RunnableContainer.stop() that all
containers extending this class must implement. |
protected org.codehaus.cargo.util.AntUtils |
getAntUtils() |
String[] |
getExtraClasspath() |
org.codehaus.cargo.util.FileHandler |
getFileHandler() |
String |
getHome() |
protected HttpUtils |
getHttpUtils() |
protected JdkUtils |
getJdkUtils() |
protected ResourceUtils |
getResourceUtils() |
Map |
getSystemProperties() |
ContainerType |
getType() |
void |
setExtraClasspath(String[] classpath) |
void |
setFileHandler(org.codehaus.cargo.util.FileHandler fileHandler) |
void |
setHome(String home) |
void |
setLogger(org.codehaus.cargo.util.log.Logger logger)
Overriden in order to set the logger on ancillary components.
|
void |
setSystemProperties(Map properties) |
protected void |
startInternal()
Installed and Embedded containers do not have the same signature for their
doStart method. |
protected void |
stopInternal()
Installed and Embedded containers do not have the same signature for their
doStop method. |
protected void |
verify()
Verify required properties have been set before executing any action.
|
getConfiguration, getOutput, getState, getTimeout, isAppend, setAppend, setConfiguration, setOutput, setState, setTimeout, start, stop, waitForCompletionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConfiguration, setConfigurationgetCapability, getId, getName, getStategetOutput, getTimeout, isAppend, setAppend, setOutput, setTimeout, start, stoppublic AbstractInstalledLocalContainer(LocalConfiguration configuration)
configuration - the configuration to associate to this container. It can be changed
later on by calling AbstractLocalContainer.setConfiguration(LocalConfiguration)public void setLogger(org.codehaus.cargo.util.log.Logger logger)
setLogger in interface org.codehaus.cargo.util.log.LoggablesetLogger in class org.codehaus.cargo.util.log.LoggedObjectlogger - the logger to set and set in the ancillary objectsLoggable.setLogger(org.codehaus.cargo.util.log.Logger)protected final HttpUtils getHttpUtils()
protected final JdkUtils getJdkUtils()
protected final org.codehaus.cargo.util.AntUtils getAntUtils()
protected final ResourceUtils getResourceUtils()
public org.codehaus.cargo.util.FileHandler getFileHandler()
public void setFileHandler(org.codehaus.cargo.util.FileHandler fileHandler)
fileHandler - the Cargo file utility class to use. This method is useful for unit
testing with Mock objects as it can be passed a test file handler that doesn't perform
any real file action.public final void setHome(String home)
setHome in interface InstalledLocalContainerhome - the directory where the container is installed. Note that we're passing a String
instead of a File because we want to leave the possibility of using URIs for
specifying the home location.InstalledLocalContainer.setHome(String)public void setSystemProperties(Map properties)
setSystemProperties in interface SpawnedContainerproperties - the System properties to set in the container executing VM.SpawnedContainer.setSystemProperties(java.util.Map)public Map getSystemProperties()
getSystemProperties in interface SpawnedContainerSpawnedContainer.getSystemProperties()public void setExtraClasspath(String[] classpath)
setExtraClasspath in interface SpawnedContainerclasspath - the extra classpath that is added to the container's classpath when it is
started.SpawnedContainer.setExtraClasspath(String[])public String[] getExtraClasspath()
getExtraClasspath in interface SpawnedContainerSpawnedContainer.getExtraClasspath()public final String getHome()
getHome in interface InstalledLocalContainerInstalledLocalContainer.getHome()protected abstract void doStart(org.apache.tools.ant.taskdefs.Java java)
throws Exception
RunnableContainer.start() that all
containers extending this class must implement.java - the predefined Ant Java command to use to
start the containerException - if any error is raised during the container startprotected abstract void doStop(org.apache.tools.ant.taskdefs.Java java)
throws Exception
RunnableContainer.stop() that all
containers extending this class must implement.java - the predefined Ant Java command to use to stop the containerException - if any error is raised during the container stopprotected final void startInternal()
throws Exception
doStart method. Thus we need to abstract it.startInternal in class AbstractLocalContainerException - if any error is raised during the container startAbstractLocalContainer.startInternal()protected final void stopInternal()
throws Exception
doStop method. Thus we need to abstract it.stopInternal in class AbstractLocalContainerException - if any error is raised during the container stopAbstractLocalContainer.stopInternal()protected final void addToolsJarToClasspath(org.apache.tools.ant.types.Path classpath)
throws FileNotFoundException
classpath - the classpath object to which to add the tools.jarFileNotFoundException - in case the tools.jar file cannot be
foundprotected void verify()
verify in class AbstractLocalContainerAbstractLocalContainer.verify()public ContainerType getType()
getType in interface ContainerContainer.getType()Copyright © 2004-2013 Codehaus. All Rights Reserved.