org.codehaus.cargo.container.jetty.internal
Class AbstractJetty4x5xEmbeddedLocalContainer

java.lang.Object
  extended by org.codehaus.cargo.util.log.LoggedObject
      extended by org.codehaus.cargo.container.spi.AbstractContainer
          extended by org.codehaus.cargo.container.spi.AbstractLocalContainer
              extended by org.codehaus.cargo.container.spi.AbstractEmbeddedLocalContainer
                  extended by org.codehaus.cargo.container.jetty.internal.AbstractJettyEmbeddedLocalContainer
                      extended by org.codehaus.cargo.container.jetty.internal.AbstractJetty4x5xEmbeddedLocalContainer
All Implemented Interfaces:
Container, EmbeddedLocalContainer, RunnableContainer, LocalContainer, Loggable
Direct Known Subclasses:
Jetty4xEmbeddedLocalContainer, Jetty5xEmbeddedLocalContainer

public abstract class AbstractJetty4x5xEmbeddedLocalContainer
extends AbstractJettyEmbeddedLocalContainer

Common code for all Jetty 4.x and 5.x embedded container implementations.

Version:
$Id: AbstractJetty4x5xEmbeddedLocalContainer.java 1705 2008-09-02 13:14:55Z adriana $

Field Summary
 
Fields inherited from class org.codehaus.cargo.container.jetty.internal.AbstractJettyEmbeddedLocalContainer
server
 
Constructor Summary
AbstractJetty4x5xEmbeddedLocalContainer(LocalConfiguration configuration)
          
 
Method Summary
protected  void doStart()
          
protected abstract  void performExtraSetupOnDeployable(java.lang.Object webapp)
          Allow extending classes to perform extra setup on the web application object.
protected  void setSecurityRealm()
          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
 
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
getConfiguration, getFileHandler, getOutput, getState, getTimeout, isAppend, setAppend, setConfiguration, setFileHandler, setOutput, setState, setTimeout, start, stop, verify, waitForCompletion
 
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.Container
getId, getName, getState
 
Methods inherited from interface org.codehaus.cargo.util.log.Loggable
getLogger, setLogger
 
Methods inherited from interface org.codehaus.cargo.container.internal.RunnableContainer
getOutput, getTimeout, isAppend, setAppend, setOutput, setTimeout, start, stop
 

Constructor Detail

AbstractJetty4x5xEmbeddedLocalContainer

public AbstractJetty4x5xEmbeddedLocalContainer(LocalConfiguration configuration)

See Also:
AbstractJettyEmbeddedLocalContainer#AbstractEmbeddedLocalContainer(org.codehaus.cargo.container.configuration.LocalConfiguration)
Method Detail

doStart

protected void doStart()
                throws java.lang.Exception

Specified by:
doStart in class AbstractEmbeddedLocalContainer
Throws:
java.lang.Exception
See Also:
doStart()

performExtraSetupOnDeployable

protected abstract void performExtraSetupOnDeployable(java.lang.Object webapp)
                                               throws java.lang.Exception
Allow extending classes to perform extra setup on the web application object.

Parameters:
webapp - the Jetty web application object representing the WAR that has been added to be deployed
Throws:
java.lang.Exception - in case of error

setSecurityRealm

protected void setSecurityRealm()
                         throws java.lang.Exception
Defines 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:
java.lang.Exception - in case of error


Copyright © 2004-2011 Codehaus. All Rights Reserved.