|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.codehaus.cargo.util.log.LoggedObject
org.codehaus.cargo.container.spi.AbstractContainer
org.codehaus.cargo.container.spi.AbstractLocalContainer
org.codehaus.cargo.container.spi.AbstractInstalledLocalContainer
public abstract class AbstractInstalledLocalContainer
Default container implementation that all local installed container implementations must extend.
| Constructor Summary | |
|---|---|
AbstractInstalledLocalContainer(LocalConfiguration configuration)
Default constructor. |
|
| Method Summary | |
|---|---|
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()
|
java.lang.String[] |
getExtraClasspath()
|
org.codehaus.cargo.util.FileHandler |
getFileHandler()
|
java.lang.String |
getHome()
|
protected HttpUtils |
getHttpUtils()
|
protected JdkUtils |
getJdkUtils()
|
protected ResourceUtils |
getResourceUtils()
|
java.util.Map |
getSystemProperties()
|
ContainerType |
getType()
|
void |
setExtraClasspath(java.lang.String[] classpath)
|
void |
setFileHandler(org.codehaus.cargo.util.FileHandler fileHandler)
|
void |
setHome(java.lang.String home)
|
void |
setLogger(org.codehaus.cargo.util.log.Logger logger)
Overriden in order to set the logger on ancillary components. |
void |
setSystemProperties(java.util.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. |
| Methods inherited from class org.codehaus.cargo.container.spi.AbstractLocalContainer |
|---|
getConfiguration, getOutput, getState, getTimeout, isAppend, setAppend, setConfiguration, setOutput, setState, setTimeout, start, stop, waitForCompletion |
| 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, setConfiguration |
| Methods inherited from interface org.codehaus.cargo.container.Container |
|---|
getCapability, getId, getName, getState |
| Methods inherited from interface org.codehaus.cargo.util.log.Loggable |
|---|
getLogger |
| Methods inherited from interface org.codehaus.cargo.container.internal.RunnableContainer |
|---|
getOutput, getTimeout, isAppend, setAppend, setOutput, setTimeout, start, stop |
| Constructor Detail |
|---|
public AbstractInstalledLocalContainer(LocalConfiguration configuration)
configuration - the configuration to associate to this container. It can be changed
later on by calling AbstractLocalContainer.setConfiguration(LocalConfiguration)| Method Detail |
|---|
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(java.lang.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(java.util.Map properties)
setSystemProperties in interface SpawnedContainerproperties - the System properties to set in the container executing VM.SpawnedContainer.setSystemProperties(java.util.Map)public java.util.Map getSystemProperties()
getSystemProperties in interface SpawnedContainerSpawnedContainer.getSystemProperties()public void setExtraClasspath(java.lang.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 java.lang.String[] getExtraClasspath()
getExtraClasspath in interface SpawnedContainerSpawnedContainer.getExtraClasspath()public final java.lang.String getHome()
getHome in interface InstalledLocalContainerInstalledLocalContainer.getHome()
protected abstract void doStart(org.apache.tools.ant.taskdefs.Java java)
throws java.lang.Exception
RunnableContainer.start() that all
containers extending this class must implement.
java - the predefined Ant Java command to use to
start the container
java.lang.Exception - if any error is raised during the container start
protected abstract void doStop(org.apache.tools.ant.taskdefs.Java java)
throws java.lang.Exception
RunnableContainer.stop() that all
containers extending this class must implement.
java - the predefined Ant Java command to use to stop the container
java.lang.Exception - if any error is raised during the container stop
protected final void startInternal()
throws java.lang.Exception
doStart method. Thus we need to abstract it.
startInternal in class AbstractLocalContainerjava.lang.Exception - if any error is raised during the container startAbstractLocalContainer.startInternal()
protected final void stopInternal()
throws java.lang.Exception
doStop method. Thus we need to abstract it.
stopInternal in class AbstractLocalContainerjava.lang.Exception - if any error is raised during the container stopAbstractLocalContainer.stopInternal()
protected final void addToolsJarToClasspath(org.apache.tools.ant.types.Path classpath)
throws java.io.FileNotFoundException
classpath - the classpath object to which to add the tools.jar
java.io.FileNotFoundException - in case the tools.jar file cannot be
foundprotected void verify()
verify in class AbstractLocalContainerAbstractLocalContainer.verify()public ContainerType getType()
getType in interface ContainerContainer.getType()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||