org.jboss.dtf.testframework.coordinator
Class Action

java.lang.Object
  extended by org.jboss.dtf.testframework.coordinator.Action
Direct Known Subclasses:
PerformAction, TerminateAction

public abstract class Action
extends java.lang.Object

This class is used to store information pertaining to an action performed during a test.

Author:
Richard A. Begg

Field Summary
 int _actionType
           
static int LOCATION_ALL
           
static int LOCATION_DEPENDENT
           
static int LOCATION_INDEPENDENT
           
static int LOCATION_SPECIFIC
           
static java.lang.String[] LOCATION_STRINGS
           
static int PERFORM_TASK
           
static int START_TASK
           
static int TERMINATE_TASK
           
static int WAIT_FOR_TASK
           
 
Constructor Summary
Action()
           
 
Method Summary
abstract  java.lang.String getAssociatedNameList()
          Retrieves the name list for this action, throws an exception if no name list is associated with this action.
abstract  java.lang.String getAssociatedRuntimeTaskId()
          Retrieves the associated runtime task id., if one doesn't exist an exception is thrown.
abstract  java.lang.String getAssociatedTaskId()
          Retrieves the task id.
abstract  java.lang.String[] getJVMParameterList()
          Retrieves the parameters to be passed to the JVM that executes this action, if no parameters are associated with this action then an exception is thrown.
abstract  java.lang.String getLocation()
          Retrieves the location value associated with this action, if the action type doesn't have an associated location an exception is thrown.
 int getLocationType()
          Retrieves the location type value associated with this action, if the action type doesn't have an associated location an exception is thrown.
abstract  java.lang.String[] getParameterList()
          Retrieves the parameters to be passed to this action, if no parameters are associated with this action then an exception is thrown.
 int getType()
          Retrieves the type of action this class represents.
abstract  Element serializeToXML()
          Create an XML element which represents this action
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOCATION_INDEPENDENT

public static final int LOCATION_INDEPENDENT
See Also:
Constant Field Values

LOCATION_DEPENDENT

public static final int LOCATION_DEPENDENT
See Also:
Constant Field Values

LOCATION_ALL

public static final int LOCATION_ALL
See Also:
Constant Field Values

LOCATION_SPECIFIC

public static final int LOCATION_SPECIFIC
See Also:
Constant Field Values

LOCATION_STRINGS

public static final java.lang.String[] LOCATION_STRINGS

PERFORM_TASK

public static final int PERFORM_TASK
See Also:
Constant Field Values

START_TASK

public static final int START_TASK
See Also:
Constant Field Values

WAIT_FOR_TASK

public static final int WAIT_FOR_TASK
See Also:
Constant Field Values

TERMINATE_TASK

public static final int TERMINATE_TASK
See Also:
Constant Field Values

_actionType

public int _actionType
Constructor Detail

Action

public Action()
Method Detail

getType

public final int getType()
Retrieves the type of action this class represents.

Returns:
The type of action this class represents (PERFORM_TASK, START_TASK, WAIT_FOR_TASK, TERMINATE_TASK)

getAssociatedTaskId

public abstract java.lang.String getAssociatedTaskId()
                                              throws NoAssociatedData
Retrieves the task id. associated with this action, if the action type doesn't have an associated task id. an exception is thrown.

Returns:
The associated task id
Throws:
NoAssociatedData - Thrown if there is no associated task id.

getLocation

public abstract java.lang.String getLocation()
                                      throws NoAssociatedData
Retrieves the location value associated with this action, if the action type doesn't have an associated location an exception is thrown.

Returns:
The associated location value
Throws:
NoAssociatedData - Thrown if there is no associated task id.

getLocationType

public final int getLocationType()
                          throws NoAssociatedData
Retrieves the location type value associated with this action, if the action type doesn't have an associated location an exception is thrown.

Returns:
The associated location type value
Throws:
NoAssociatedData - Thrown if there is no associated task id.

getParameterList

public abstract java.lang.String[] getParameterList()
                                             throws NoAssociatedData
Retrieves the parameters to be passed to this action, if no parameters are associated with this action then an exception is thrown.

Returns:
The parameters to be passed to this action
Throws:
NoAssociatedData - Thrown if there are no parameters for this action.

getJVMParameterList

public abstract java.lang.String[] getJVMParameterList()
                                                throws NoAssociatedData
Retrieves the parameters to be passed to the JVM that executes this action, if no parameters are associated with this action then an exception is thrown.

Returns:
The parameters to be passed to the JVM
Throws:
NoAssociatedData - Thrown if there are no parameters to pass to the JVM.

getAssociatedRuntimeTaskId

public abstract java.lang.String getAssociatedRuntimeTaskId()
                                                     throws NoAssociatedData
Retrieves the associated runtime task id., if one doesn't exist an exception is thrown.

Returns:
The associated runtime task id.
Throws:
NoAssociatedData - Thrown if there is no associated runtime task id.

getAssociatedNameList

public abstract java.lang.String getAssociatedNameList()
                                                throws NoAssociatedData
Retrieves the name list for this action, throws an exception if no name list is associated with this action.

Returns:
The name list associated with this action.
Throws:
NoAssociatedData - Thrown if there is no associated name list.

serializeToXML

public abstract Element serializeToXML()
                                throws NoAssociatedData
Create an XML element which represents this action

Returns:
The XML element representing this action.
Throws:
NoAssociatedData