public abstract class AbstractInstalledLocalContainer extends AbstractLocalContainer implements InstalledLocalContainer
Constructor and Description |
---|
AbstractInstalledLocalContainer(LocalConfiguration configuration)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addExtraClasspath(String location) |
void |
addSharedClasspath(String location) |
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() |
String |
getHome() |
protected HttpUtils |
getHttpUtils() |
protected JdkUtils |
getJdkUtils() |
protected ResourceUtils |
getResourceUtils() |
String[] |
getSharedClasspath() |
Map |
getSystemProperties() |
ContainerType |
getType() |
void |
ifPresentAddPathToList(String location,
List list)
adds the location to the list, if the file exists.
|
void |
setExtraClasspath(String[] classpath) |
void |
setHome(String home) |
protected void |
setJvmToLaunchContainerIn(org.apache.tools.ant.taskdefs.Java java)
Determines which java virtual machine will run the container.
|
void |
setLogger(org.codehaus.cargo.util.log.Logger logger)
Overriden in order to set the logger on ancillary components.
|
void |
setSharedClasspath(String[] classpath) |
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, getFileHandler, getOutput, getState, getTimeout, isAppend, setAppend, setConfiguration, setFileHandler, setOutput, setState, setTimeout, start, stop, waitForCompletion
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConfiguration, getFileHandler, setConfiguration, setFileHandler
getCapability, getId, getName, getState
getOutput, getTimeout, isAppend, setAppend, setOutput, setTimeout, start, stop
public 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.Loggable
setLogger
in class org.codehaus.cargo.util.log.LoggedObject
logger
- 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 final void setHome(String home)
setHome
in interface InstalledLocalContainer
home
- 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 SpawnedContainer
properties
- the System properties to set in the container executing VM.SpawnedContainer.setSystemProperties(java.util.Map)
public Map getSystemProperties()
getSystemProperties
in interface SpawnedContainer
SpawnedContainer.getSystemProperties()
public void setExtraClasspath(String[] classpath)
setExtraClasspath
in interface SpawnedContainer
classpath
- the extra classpath that is added to the container's classpath when it is
started.SpawnedContainer.setExtraClasspath(String[])
public String[] getExtraClasspath()
getExtraClasspath
in interface SpawnedContainer
SpawnedContainer.getExtraClasspath()
public void setSharedClasspath(String[] classpath)
setSharedClasspath
in interface SpawnedContainer
classpath
- the shared classpath that is shared by the container applications.InstalledLocalContainer.getHome()
public String[] getSharedClasspath()
getSharedClasspath
in interface SpawnedContainer
SpawnedContainer.getSharedClasspath()
public final String getHome()
getHome
in interface InstalledLocalContainer
InstalledLocalContainer.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 AbstractLocalContainer
Exception
- 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 AbstractLocalContainer
Exception
- if any error is raised during the container stopAbstractLocalContainer.stopInternal()
protected void setJvmToLaunchContainerIn(org.apache.tools.ant.taskdefs.Java java)
java
- the java command that will start the containerprotected 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 AbstractLocalContainer
AbstractLocalContainer.verify()
public ContainerType getType()
getType
in interface Container
Container.getType()
public void addExtraClasspath(String location)
addExtraClasspath
in interface SpawnedContainer
location
- the extra classpath that is added to the container's classpath when it is
started.org.codehaus.cargo.container.SpawnedContainer#addExtraClasspath()
public void addSharedClasspath(String location)
addSharedClasspath
in interface SpawnedContainer
location
- the shared classpath that is added to the container's classpath when it is
started.org.codehaus.cargo.container.SpawnedContainer#addSharedClasspath()
Copyright © 2004-2013 Codehaus. All Rights Reserved.