org.jboss.testharness.integration.tomcat
Class TomcatConnector

java.lang.Object
  extended by org.jboss.testharness.spi.helpers.AbstractContainerConnector
      extended by org.jboss.testharness.integration.tomcat.TomcatConnector
All Implemented Interfaces:
Configurable, Containers

public class TomcatConnector
extends AbstractContainerConnector
implements Containers

Author:
jeffgenender, Pete Muir

Field Summary
 
Fields inherited from class org.jboss.testharness.spi.helpers.AbstractContainerConnector
EXTRA_CONFIGURATION_DIR_PROPERTY_NAME, FORCE_RESTART_PROPERTY_NAME, HOST_PROPERTY_NAME, JAVA_OPTS, JAVA_OPTS_PROPERTY_NAME, PORT_PROPERTY_NAME, SHUTDOWN_DELAY_PROPERTY_NAME
 
Fields inherited from interface org.jboss.testharness.spi.Containers
PROPERTY_NAME
 
Constructor Summary
TomcatConnector()
           
 
Method Summary
 boolean deploy(InputStream stream, String name)
          The war/ear to deploy to the container, it should be read using a JarInputStream.
protected  String getBinDirectory()
           
protected  String getContextName(String name)
           
 DeploymentException getDeploymentException()
          If the deployment failed, obtain the cause of the deployment failure.
protected  String getLogName()
           
protected  String getManagerUrl(String command, String... parameters)
           
protected  String getServerHomePropertyName()
           
protected  void shutdownServer()
           
protected  void startServer()
           
 void undeploy(String name)
          Undeploy the war/ear from the container.
 
Methods inherited from class org.jboss.testharness.spi.helpers.AbstractContainerConnector
cleanup, copy, copy, dump, getDeploymentExceptionTransformer, getDeploymentExceptionTransformerPropertyName, getExtraConfigurationDir, getExtraConfigurationDirPropertyName, getForceRestart, getForceRestartPropertyName, getHost, getHostPropertyName, getHttpUrl, getJavaOpts, getPort, getPortPropertyName, getProperties, getServerBootTimeout, getServerBootTimeoutPropertyName, getServerDirectory, getShutdownDelay, getShutdownDelayPropertyName, isServerUp, launch, loadProperties, restartServer, setConfiguration, setup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.testharness.spi.Containers
cleanup, setup
 

Constructor Detail

TomcatConnector

public TomcatConnector()
                throws IOException
Throws:
IOException
Method Detail

getServerHomePropertyName

protected String getServerHomePropertyName()
Specified by:
getServerHomePropertyName in class AbstractContainerConnector

shutdownServer

protected void shutdownServer()
                       throws IOException
Specified by:
shutdownServer in class AbstractContainerConnector
Throws:
IOException

startServer

protected void startServer()
                    throws IOException
Specified by:
startServer in class AbstractContainerConnector
Throws:
IOException

getBinDirectory

protected String getBinDirectory()

getLogName

protected String getLogName()
Specified by:
getLogName in class AbstractContainerConnector

deploy

public boolean deploy(InputStream stream,
                      String name)
               throws IOException
Description copied from interface: Containers
The war/ear to deploy to the container, it should be read using a JarInputStream. Any deployment exceptions can be found through Containers.getDeploymentException(). For a successful deployment, a symmetric Containers.undeploy(String) will be called.

Specified by:
deploy in interface Containers
Parameters:
stream - the archive
name - the name the TCK uses to refer to this archive, unique within this tck run
Returns:
true if the deployment suceeded, otherwise false
Throws:
IOException - if any communication problems with the server occur during deployment. These will cause the test suite to fail.
See Also:
Containers.undeploy(String)

getDeploymentException

public DeploymentException getDeploymentException()
Description copied from interface: Containers
If the deployment failed, obtain the cause of the deployment failure. The true cause of the deployment failure must be included in the cause stack returned by Throwable.getCause().

Specified by:
getDeploymentException in interface Containers
Returns:
a DeploymentException wrapping the deployment failure, or null if the deployment suceeded

undeploy

public void undeploy(String name)
              throws IOException
Description copied from interface: Containers
Undeploy the war/ear from the container.

Specified by:
undeploy in interface Containers
Parameters:
name - the name the TCK uses to refer to this archive, unique within this tck run
Throws:
IOException - if any communication problems with the server occur during deployment. These will cause the test suite to fail.
See Also:
Containers.deploy(InputStream, String)

getManagerUrl

protected String getManagerUrl(String command,
                               String... parameters)

getContextName

protected String getContextName(String name)


Copyright © 2009-2011. All Rights Reserved.