public SimpleSessionHistoryManager() {
}
public void apply(String historyToken) {
LOGGER.log(Level.DEBUG, "Apply "+historyToken, null);
HistoryTokenizer tok = new HistoryTokenizer(historyToken);
if ((tok.getToken("s") == null)
|| (Integer.parseInt(tok.getToken("s").toString()) == currentState)) {
return;
}
int targetState = Integer.parseInt(tok.getToken("s").toString());
LOGGER.log(
Level.SPAM,
"Repositioning to state: " + targetState + " of "
+ states.size() + "from " + currentState, null);
if(targetState >= states.size() ){
tok.setToken("s", ""+(states.size() -1));
return;
}
callState(targetState);
currentState = targetState;
}