ProtocolLearner
Class FSATransition

java.lang.Object
  extended by ProtocolLearner.FSATransition

public class FSATransition
extends java.lang.Object

Inner class that stores information relevant for each transition such as the destination state, input symbol and output symbol sequences. Every state is associated with a list of transactions in a hash map.


Constructor Summary
FSATransition(java.lang.String inputSymbol, int newState)
          Constructor 2 (without output message sequence)
FSATransition(java.lang.String inputSymbol, int newState, java.util.ArrayList<java.lang.String> outputMsgSeq)
          Constructor 1 (with output message sequence)
 
Method Summary
 boolean addOutputSequence(java.util.ArrayList<java.lang.String> outSeq)
          Adds an output message sequence to the list of output message sequences
 boolean checkOutMsgSeqPresense(java.util.ArrayList<java.lang.String> inputList)
          Checks if there is an output message sequences that matches to the input out.
 void decrementStepsBeforeAdding()
           
 StringForFuzzing getFuzzingString()
           
 GenericSequence getGenericSequence()
           
 java.lang.String getInputSymbol()
          Returns the input symbol of the transition
 int getNewState()
          Returns the next available index for a new state
 java.util.ArrayList<java.util.ArrayList<java.lang.String>> getOutputMsgSeq()
          Returns the list of output symbol messages
 int getStepsBeforeAdding()
           
 void setFuzzingString(StringForFuzzing g)
          Sets the fuzzing string for the transition
 void setStepsBeforeAdding(int s)
          Steps before adding the transition is used when restoring the loops while traversing the message trace
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FSATransition

public FSATransition(java.lang.String inputSymbol,
                     int newState,
                     java.util.ArrayList<java.lang.String> outputMsgSeq)
Constructor 1 (with output message sequence)

Parameters:
inputSymbol - Input symbol for the transition
newState - Destination state
outputMsgSeq - A sequence of output messages associated with the transition

FSATransition

public FSATransition(java.lang.String inputSymbol,
                     int newState)
Constructor 2 (without output message sequence)

Parameters:
inputSymbol - Input symbol for the transition
newState - Destination state
outputMsgSeq - A sequence of output messages associated with the transition
Method Detail

getNewState

public int getNewState()
Returns the next available index for a new state

Returns:
Unique ID of the new state

getInputSymbol

public java.lang.String getInputSymbol()
Returns the input symbol of the transition

Returns:
The input symbol

getOutputMsgSeq

public java.util.ArrayList<java.util.ArrayList<java.lang.String>> getOutputMsgSeq()
Returns the list of output symbol messages

Returns:
A list of output symbol messages

checkOutMsgSeqPresense

public boolean checkOutMsgSeqPresense(java.util.ArrayList<java.lang.String> inputList)
Checks if there is an output message sequences that matches to the input out. msg seq.

Parameters:
inputList - ArrayList of output symbols ( ie output msg sequence )
Returns:
True if such sequence is already present, false otherwise

addOutputSequence

public boolean addOutputSequence(java.util.ArrayList<java.lang.String> outSeq)
Adds an output message sequence to the list of output message sequences

Parameters:
outSeq - An output message sequence
Returns:
True - if everything finished ok, false otherwise

getGenericSequence

public GenericSequence getGenericSequence()
Returns:
The generic sequence

setFuzzingString

public void setFuzzingString(StringForFuzzing g)
Sets the fuzzing string for the transition


getFuzzingString

public StringForFuzzing getFuzzingString()
Returns:
The fuzzer engine corresponding to the transition

setStepsBeforeAdding

public void setStepsBeforeAdding(int s)
Steps before adding the transition is used when restoring the loops while traversing the message trace


getStepsBeforeAdding

public int getStepsBeforeAdding()

decrementStepsBeforeAdding

public void decrementStepsBeforeAdding()