|
||||||||||
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 | |
---|---|
void |
addExtraClasspath(java.lang.String location)
|
void |
addSharedClasspath(java.lang.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 AntUtils |
getAntUtils()
|
java.lang.String[] |
getExtraClasspath()
|
java.lang.String |
getHome()
|
protected HttpUtils |
getHttpUtils()
|
protected JdkUtils |
getJdkUtils()
|
protected ResourceUtils |
getResourceUtils()
|
java.lang.String[] |
getSharedClasspath()
|
java.util.Map |
getSystemProperties()
|
ContainerType |
getType()
|
void |
ifPresentAddPathToList(java.lang.String location,
java.util.List list)
adds the location to the list, if the file exists. |
void |
setExtraClasspath(java.lang.String[] classpath)
|
void |
setHome(java.lang.String home)
|
protected void |
setJvmToLaunchContainerIn(org.apache.tools.ant.taskdefs.Java java)
Determines which java virtual machine will run the container. |
void |
setLogger(Logger logger)
Overriden in order to set the logger on ancillary components. |
void |
setSharedClasspath(java.lang.String[] classpath)
|
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, getFileHandler, getOutput, getState, getTimeout, isAppend, setAppend, setConfiguration, setFileHandler, 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, getFileHandler, setConfiguration, setFileHandler |
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(Logger logger)
setLogger
in interface Loggable
setLogger
in class 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 AntUtils getAntUtils()
protected final ResourceUtils getResourceUtils()
public final void setHome(java.lang.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(java.util.Map properties)
setSystemProperties
in interface SpawnedContainer
properties
- the System properties to set in the container executing VM.SpawnedContainer.setSystemProperties(java.util.Map)
public java.util.Map getSystemProperties()
getSystemProperties
in interface SpawnedContainer
SpawnedContainer.getSystemProperties()
public void setExtraClasspath(java.lang.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 java.lang.String[] getExtraClasspath()
getExtraClasspath
in interface SpawnedContainer
SpawnedContainer.getExtraClasspath()
public void setSharedClasspath(java.lang.String[] classpath)
setSharedClasspath
in interface SpawnedContainer
classpath
- the shared classpath that is shared by the container applications.InstalledLocalContainer.getHome()
public java.lang.String[] getSharedClasspath()
getSharedClasspath
in interface SpawnedContainer
SpawnedContainer.getSharedClasspath()
public final java.lang.String getHome()
getHome
in interface InstalledLocalContainer
InstalledLocalContainer.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 startprotected 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 stopprotected final void startInternal() throws java.lang.Exception
doStart
method. Thus we need to abstract it.
startInternal
in class AbstractLocalContainer
java.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 AbstractLocalContainer
java.lang.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 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 AbstractLocalContainer
AbstractLocalContainer.verify()
public ContainerType getType()
getType
in interface Container
Container.getType()
public void addExtraClasspath(java.lang.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(java.lang.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()
public void ifPresentAddPathToList(java.lang.String location, java.util.List list)
location
- path to add to the listlist
- where to append this path
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |