org.jboss.testharness.spi.helpers
Class AbstractContainerConnector

java.lang.Object
  extended by org.jboss.testharness.spi.helpers.AbstractContainerConnector
All Implemented Interfaces:
Configurable

public abstract class AbstractContainerConnector
extends java.lang.Object
implements Configurable


Field Summary
static java.lang.String EXTRA_CONFIGURATION_DIR_PROPERTY_NAME
           
static java.lang.String FORCE_RESTART_PROPERTY_NAME
           
static java.lang.String HOST_PROPERTY_NAME
           
static java.lang.String JAVA_OPTS
           
static java.lang.String JAVA_OPTS_PROPERTY_NAME
           
static java.lang.String PORT_PROPERTY_NAME
           
static java.lang.String SHUTDOWN_DELAY_PROPERTY_NAME
           
 
Constructor Summary
AbstractContainerConnector()
           
 
Method Summary
 void cleanup()
           
protected static void copy(java.io.InputStream inputStream, java.io.File file)
           
static void copy(java.io.InputStream source, java.io.OutputStream destination)
           
protected  void dump(java.io.InputStream is)
           
protected  java.lang.String getExtraConfigurationDir()
           
protected  java.lang.String getExtraConfigurationDirPropertyName()
           
protected  java.lang.Boolean getForceRestart()
           
protected  java.lang.String getForceRestartPropertyName()
           
protected  java.lang.String getHost()
           
protected  java.lang.String getHostPropertyName()
           
protected  java.lang.String getHttpUrl()
           
protected  java.lang.String getJavaOpts()
           
protected abstract  java.lang.String getLogName()
           
protected  java.lang.String getPort()
           
protected  java.lang.String getPortPropertyName()
           
protected  PropertiesManager getProperties()
           
protected  java.lang.Long getServerBootTimeout()
           
protected  java.lang.String getServerBootTimeoutPropertyName()
           
protected  java.lang.String getServerDirectory()
           
protected abstract  java.lang.String getServerHomePropertyName()
           
protected  java.lang.Integer getShutdownDelay()
           
protected  java.lang.String getShutdownDelayPropertyName()
           
protected  boolean isServerUp()
          Check that the server is up by attempting to connect to it's front page
protected  void launch(java.lang.String directory, java.lang.String scriptFileName, java.lang.String params)
           
protected  void loadProperties(java.io.File file)
           
protected  void restartServer()
           
 void setConfiguration(Configuration configuration)
           
 void setup()
           
protected abstract  void shutdownServer()
           
protected abstract  void startServer()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JAVA_OPTS

public static java.lang.String JAVA_OPTS

JAVA_OPTS_PROPERTY_NAME

public static final java.lang.String JAVA_OPTS_PROPERTY_NAME
See Also:
Constant Field Values

FORCE_RESTART_PROPERTY_NAME

public static final java.lang.String FORCE_RESTART_PROPERTY_NAME
See Also:
Constant Field Values

HOST_PROPERTY_NAME

public static final java.lang.String HOST_PROPERTY_NAME
See Also:
Constant Field Values

PORT_PROPERTY_NAME

public static final java.lang.String PORT_PROPERTY_NAME
See Also:
Constant Field Values

SHUTDOWN_DELAY_PROPERTY_NAME

public static final java.lang.String SHUTDOWN_DELAY_PROPERTY_NAME
See Also:
Constant Field Values

EXTRA_CONFIGURATION_DIR_PROPERTY_NAME

public static final java.lang.String EXTRA_CONFIGURATION_DIR_PROPERTY_NAME
See Also:
Constant Field Values
Constructor Detail

AbstractContainerConnector

public AbstractContainerConnector()
                           throws java.io.IOException
Throws:
java.io.IOException
Method Detail

copy

protected static void copy(java.io.InputStream inputStream,
                           java.io.File file)
                    throws java.io.IOException
Throws:
java.io.IOException

copy

public static void copy(java.io.InputStream source,
                        java.io.OutputStream destination)
                 throws java.io.IOException
Throws:
java.io.IOException

setConfiguration

public void setConfiguration(Configuration configuration)
Specified by:
setConfiguration in interface Configurable

isServerUp

protected boolean isServerUp()
Check that the server is up by attempting to connect to it's front page

Returns:
true if the connection was made

setup

public void setup()
           throws java.io.IOException
Throws:
java.io.IOException

restartServer

protected void restartServer()
                      throws java.io.IOException
Throws:
java.io.IOException

loadProperties

protected void loadProperties(java.io.File file)
                       throws java.io.IOException
Throws:
java.io.IOException

cleanup

public void cleanup()
             throws java.io.IOException
Throws:
java.io.IOException

shutdownServer

protected abstract void shutdownServer()
                                throws java.io.IOException
Throws:
java.io.IOException

startServer

protected abstract void startServer()
                             throws java.io.IOException
Throws:
java.io.IOException

launch

protected void launch(java.lang.String directory,
                      java.lang.String scriptFileName,
                      java.lang.String params)
               throws java.io.IOException
Throws:
java.io.IOException

dump

protected void dump(java.io.InputStream is)

getServerHomePropertyName

protected abstract java.lang.String getServerHomePropertyName()

getServerDirectory

protected java.lang.String getServerDirectory()

getServerBootTimeoutPropertyName

protected java.lang.String getServerBootTimeoutPropertyName()

getServerBootTimeout

protected java.lang.Long getServerBootTimeout()

getForceRestartPropertyName

protected java.lang.String getForceRestartPropertyName()

getForceRestart

protected java.lang.Boolean getForceRestart()

getHostPropertyName

protected java.lang.String getHostPropertyName()

getHost

protected java.lang.String getHost()

getPortPropertyName

protected java.lang.String getPortPropertyName()

getPort

protected java.lang.String getPort()

getShutdownDelayPropertyName

protected java.lang.String getShutdownDelayPropertyName()

getShutdownDelay

protected java.lang.Integer getShutdownDelay()

getProperties

protected PropertiesManager getProperties()

getJavaOpts

protected java.lang.String getJavaOpts()

getHttpUrl

protected java.lang.String getHttpUrl()

getExtraConfigurationDirPropertyName

protected java.lang.String getExtraConfigurationDirPropertyName()

getLogName

protected abstract java.lang.String getLogName()

getExtraConfigurationDir

protected java.lang.String getExtraConfigurationDir()


Copyright © 2009. All Rights Reserved.