Class TransitionTable
- java.lang.Object
-
- org.ow2.clif.scenario.transitions.TransitionTable
-
- All Implemented Interfaces:
java.lang.Cloneable
public class TransitionTable extends java.lang.Object implements java.lang.CloneableThis class provides utilities to design a scenario, which deals with these aspects:
- Probability for the virtual user to reach a given link.
- Probability for the virtual user to click on the back button.
- Probability for the virtual user to end the session.
- Think time between each virtual user action.
The structure is a matrix that represents the probability for a virtual user to navigate from a specific page to another one.
This class need an external text file which has the following structure:
- Each value at ligne x and column y represents the probality for the virtual user, to go from the "page y" to the "page x".
It must be a value between 0 and 1.
-
-
Constructor Summary
Constructors Constructor Description TransitionTable(java.lang.String filename, java.lang.String actions_file, boolean useMatrixThinkTime, boolean identifyByOrigin)Create a transition table with specifics files and give information about how to handle think time.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TransitionTablecreateNewTransitionTable()Create a new transition table, which have the same table than it tablejava.lang.StringgetCurrentStateName()Return the name of the current statelonggetCurrentWaitingTime()Return the time to wait for the current stateTransitiongetNextTransition()voidresetPreviousState()This method is used to reset all the previous states
-
-
-
Constructor Detail
-
TransitionTable
public TransitionTable(java.lang.String filename, java.lang.String actions_file, boolean useMatrixThinkTime, boolean identifyByOrigin)Create a transition table with specifics files and give information about how to handle think time.
In all cases, the scenario can handle its own think time in addition to one describe above.- Parameters:
filename- The transition file to load data from.actions_file- The file containing the actions.useMatrixThinkTime- true means that think time in the matrix are used.identifyByOrigin- true means that the actions depends on the previous state.
-
-
Method Detail
-
createNewTransitionTable
public TransitionTable createNewTransitionTable()
Create a new transition table, which have the same table than it table- Returns:
- the new transition table
-
resetPreviousState
public void resetPreviousState()
This method is used to reset all the previous states
-
getCurrentStateName
public java.lang.String getCurrentStateName()
Return the name of the current state- Returns:
- The String representing the name of the current state in the matrix
-
getCurrentWaitingTime
public long getCurrentWaitingTime()
Return the time to wait for the current state- Returns:
- the time to wait
-
getNextTransition
public Transition getNextTransition()
- Returns:
- the action associated to the next state
-
-