public class StateMachine extends Object
| Constructor and Description |
|---|
StateMachine(InMemoryStateFlowGraph sfg,
com.google.common.collect.ImmutableList<Invariant> invariantList,
Plugins plugins,
StateComparator stateComparator) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
changeState(StateVertex nextState)
Change the currentState to the nextState if possible.
|
static StateVertex |
createIndex(String url,
String dom,
String strippedDom) |
StateVertex |
getCurrentState()
Return the current State in this state machine.
|
StateVertex |
newStateFor(EmbeddedBrowser browser) |
void |
rewind()
reset the state machine to the initial state.
|
boolean |
swithToStateAndCheckIfClone(Eventable event,
StateVertex newState,
CrawlerContext context)
Adds an edge between the current and new state.
|
public StateMachine(InMemoryStateFlowGraph sfg, com.google.common.collect.ImmutableList<Invariant> invariantList, Plugins plugins, StateComparator stateComparator)
public static StateVertex createIndex(String url, String dom, String strippedDom)
StateVertex.public StateVertex newStateFor(EmbeddedBrowser browser)
public boolean changeState(StateVertex nextState)
nextState - the next state.public StateVertex getCurrentState()
public void rewind()
public boolean swithToStateAndCheckIfClone(Eventable event, StateVertex newState, CrawlerContext context)
Copyright © 2007-2013. All Rights Reserved.