Class Jetty5xEmbeddedLocalContainer
- java.lang.Object
-
- org.codehaus.cargo.util.log.LoggedObject
-
- org.codehaus.cargo.container.spi.AbstractContainer
-
- org.codehaus.cargo.container.spi.AbstractLocalContainer
-
- org.codehaus.cargo.container.spi.AbstractEmbeddedLocalContainer
-
- org.codehaus.cargo.container.jetty.internal.AbstractJettyEmbeddedLocalContainer
-
- org.codehaus.cargo.container.jetty.Jetty5xEmbeddedLocalContainer
-
- All Implemented Interfaces:
Container,EmbeddedLocalContainer,RunnableContainer,LocalContainer,Loggable
public class Jetty5xEmbeddedLocalContainer extends AbstractJettyEmbeddedLocalContainer
A Jetty 5.x instance running embedded.
-
-
Field Summary
Fields Modifier and Type Field Description static StringIDUnique container id.-
Fields inherited from class org.codehaus.cargo.container.jetty.internal.AbstractJettyEmbeddedLocalContainer
server
-
-
Constructor Summary
Constructors Constructor Description Jetty5xEmbeddedLocalContainer(LocalConfiguration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoStart()Implementation ofRunnableContainer.start()that all containers extending this class must implement.StringgetId()StringgetName()protected voidsetDefaultRealm(Object webapp)protected voidsetSecurityRealm()Defines a security realm and adds defined users to it.-
Methods inherited from class org.codehaus.cargo.container.jetty.internal.AbstractJettyEmbeddedLocalContainer
createServerObject, doStop, getCapability, getServer, getVersion, waitForCompletion
-
Methods inherited from class org.codehaus.cargo.container.spi.AbstractEmbeddedLocalContainer
getClassLoader, getType, setClassLoader, startInternal, stopInternal
-
Methods inherited from class org.codehaus.cargo.container.spi.AbstractLocalContainer
executePostStartTasks, forceStopInternal, getConfiguration, getFileHandler, getOutput, getState, getTimeout, isAppend, restart, setAppend, setConfiguration, setFileHandler, setOutput, setState, setTimeout, start, stop, verify, waitForPortShutdown, waitForStarting
-
Methods inherited from class org.codehaus.cargo.util.log.LoggedObject
getLogger, setLogger
-
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.internal.RunnableContainer
getOutput, getTimeout, isAppend, restart, setAppend, setOutput, setTimeout, start, stop
-
-
-
-
Field Detail
-
ID
public static final String ID
Unique container id.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Jetty5xEmbeddedLocalContainer
public Jetty5xEmbeddedLocalContainer(LocalConfiguration configuration)
-
-
Method Detail
-
doStart
protected void doStart() throws ExceptionImplementation ofRunnableContainer.start()that all containers extending this class must implement.- Specified by:
doStartin classAbstractEmbeddedLocalContainer- Throws:
Exception- if any error is raised during the container start- See Also:
AbstractEmbeddedLocalContainer.doStart()
-
setSecurityRealm
protected void setSecurityRealm() throws ExceptionDefines a security realm and adds defined users to it. If a user has specified the standard ServletPropertySet.USERS property, then we try and turn these into an in-memory default realm, and then set that realm on all of the webapps.
TODO: this is not ideal. We need a way to specify N named realms to the server so that individual webapps can find their appropriate realms by name.- Throws:
Exception- in case of error
-
setDefaultRealm
protected void setDefaultRealm(Object webapp) throws Exception
- Parameters:
webapp- the webapp to set the default security realm on- Throws:
Exception- invokation error
-
getId
public String getId()
- Returns:
- the short name of the container. Note: this is not a unique id. It is simply the name in a computer-usable format.
-
getName
public String getName()
- Returns:
- the human readable name of the Container (ex: "Resin 3.x", "JBoss 3.0.8", etc).
-
-