org.ourgrid.test.functionalunits
Interface FunctionalTestUnit

All Known Implementing Classes:
CorePeerUnit, MyGridUnit, PeerUnit, UserAgentUnit

public interface FunctionalTestUnit

A FunctionalTestUnit will represents a test unit that will be used to compose a test scenario. FunctioTestUnit interacts with the FunctionalTestControls to mantain its state and properties file.


Method Summary
 void destroy()
          This method is used to delete enviroment files that the FunctionalTestUnit uses.
 java.lang.String getDefaultPropertiesFile()
          Returns the default properties file that will be used by this FunctionalTestUnit.
 java.lang.String getHostname()
          Get's the hostname of this functional unit.
 java.lang.String getName()
          Returns the name of this FunctionalTestUnit.
 int getPort()
          Get's the port of this functional unit.
 boolean isRunning()
          Verify if this FunctionalTestUnit is running.
 void kill()
          Kills this unit by calling System.exit()
 void start()
          Start this FunctionalTestUnit.
 boolean stillIdle()
          This method verifies if the functional test unit was not waken up since the last waitUntilWorkIsDone() call.
 void stop()
          Stop this FunctionalTestUnit.
 void waitUntilWorkIsDone()
          This method will block until this FunctionalTestUnit has stopped all work.
 

Method Detail

start

void start()
           throws java.lang.Exception
Start this FunctionalTestUnit.

Throws:
java.lang.Exception

stop

void stop()
          throws java.lang.Exception
Stop this FunctionalTestUnit.

Throws:
java.lang.Exception

destroy

void destroy()
This method is used to delete enviroment files that the FunctionalTestUnit uses.


isRunning

boolean isRunning()
Verify if this FunctionalTestUnit is running.

Returns:
Returns true if this FunctionalTestUnit is running.

getName

java.lang.String getName()
Returns the name of this FunctionalTestUnit.

Returns:
The name of this FunctionalTestUnit.

getHostname

java.lang.String getHostname()
Get's the hostname of this functional unit.

Returns:
Hostname.

getPort

int getPort()
Get's the port of this functional unit.

Returns:
Port

getDefaultPropertiesFile

java.lang.String getDefaultPropertiesFile()
Returns the default properties file that will be used by this FunctionalTestUnit.


waitUntilWorkIsDone

void waitUntilWorkIsDone()
                         throws java.lang.Exception
This method will block until this FunctionalTestUnit has stopped all work.

Throws:
java.lang.Exception

stillIdle

boolean stillIdle()
                  throws java.lang.Exception
This method verifies if the functional test unit was not waken up since the last waitUntilWorkIsDone() call.

Returns:
True if it hasnt.
Throws:
java.lang.Exception

kill

void kill()
          throws java.lang.Exception
Kills this unit by calling System.exit()

Throws:
java.lang.Exception